Tuesday, 15 March 2011

maven 3 - its time

After getting some weird issues with my builds I tried out maven 3 again to see if it magically fixed things. It didn't fix that issue, but I'm quite impressed with maven 3 so far:
  • It can build subprojects in parallel which gives me quite a performance boost.
  • The other big thing for me is that "lots of bugs are fixed now", which is a bit hard to measure right away but will probably ensure a more enjoyable experience.
Richard Kolb asked for some benchmarks so here they are. It is probably a lot more beneficial for my 17 module project to build it in parallel.
  • It was done on my Intel i7 Q749 @ 1.73GHz with SSD
  • The second run of each hopefully avoids delays while "checking for updates" 
  • Java version: 1.6.0_24
  • OS name: "linux" version: "2.6.35-27-generic" arch: "amd64" Family: "unix"
  • It includes a GWT widget compile 
  • Ran mvn clean install in the maven reactor with 17 subprojects
== Apache Maven 2.2.1 (rdebian-4) ==
4 minutes 15 seconds
3 minutes 18 seconds
3 minutes 22 seconds

== Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200) (serial) ==
3:34.911s
3:14.637s

=== apache-maven-3.0.3/bin/mvn -T6 clean install (using 6 threads) ===
2:23.427s
2:23.224s

=== apache-maven-3.0.3/bin/mvn -T6 clean install (using 8 threads) ===
2:22.137s
2:19.600s

so I save about a minute (or 28%) when runing thing in parallel

I had to upgrade some maven plugins to allow things to be treadsafe with the help of this page:
https://cwiki.apache.org/MAVEN/parallel-builds-in-maven-3.html

Monday, 28 February 2011

Toshiba Qosmio X500-12V

I got my new lappy a couple of months ago, so I better post already or hold my peace.
I'm quite impressed, although I haven't tried to get everything working yet still need to play with multitouch and the fingerprint reader . Suspend to disk didn't work and I haven't tried to suspend to ram yet, but it is booting so fast that I don't really need that.

I got a solid state and conventional harddrive, where the solid state disk performs about twice as good as the conventional one (was hoping for better, but it is ok).
SSD: 152.64 MB/sec
HDD: 89.22 MB/sec

* I Managed to migrate my previous installation  (Ubuntu maverick) from my other laptop, moving around directories into special partitions (having most of the main os on the SSD but pointing /var/cache /var/log /var/tmp to the HDD)
* I had to fight a bit with grub and X to get it to work on the new hardware, but it was worth it in the end.
* I now get much better wireless reception:). (previously my connection died all the time:(
* The nvidia drivers works nicely which makes desktop effects work well - I can invert my desktop colours at last!
* Vista in a virtualbox works seamlessly for me now.
* bzr tests runs in 5 minutes now in stead of 18.
* gwt extensions compile in a minute now and does not lock up my laptop; previously it ran for over 5 minutes during which I could barely read e-mail because the system was so busy.
* Eclipse starts and stops a LOT quicker yay!
* Sound is really good (with the 3 watt harman/kardon 1by3's).
* Got the card reader working with some tweaking:
http://ubuntuforums.org/showthread.php?p=10302581

Saturday, 11 December 2010

cleaning frequency of /tmp and /var/tmp

/tmp normally gets cleared after every reboot on ubuntu which is a bit quick for me. For example I sometimes want to save a screenshot and maybe quickly edit it and e-mail it, but I don't want to loose it if my system reboots for whatever reason (including forgetting that I was busy with something).
It turns out that you can set how long to keep stuff in /tmp by setting TMPTIME in /etc/default/rcS to the number of days to keep stuff (I'm going for 7days now).
http://linuxers.org/article/differences-between-tmp-and-vartmp

Apparently you normally should put temp stuff you want to keep a bit longer in /var/tmp [1] but that does not seem to get cleared out regularly.
So I made a weekly cronjob to clean out stuff older than 60 days:/etc/cron.weekly/clean_var_tmp.sh
#!/bin/bash
days=60
tmpdir=/var/tmp/
find -P ${tmpdir} -type f -mtime +$days        -exec su amanica -c "notify-send 'weekly clean ${tmpdir}' 'rm {}'" \; -exec rm {} \;
find -P ${tmpdir} -type d -mtime +$days -empty -exec su amanica -c "notify-send 'weekly clean ${tmpdir}' 'rm {}'" \; -exec rm -r {} \;

http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=1524077

[1] http://www.pathname.com/fhs/2.2/fhs-5.15.html