Posts Tagged ‘benchmark’

Running trac-admin from python

No Comments »

Recently, I’ve been trying to speed up my Subversion post-commit hooks.  I have several things which are run from the hook, and the number of separate commands leads to a bunch of fork() calls (or clone(), whatever).  Several of the scripts are already Python, so I figured I’d just write the hooks themselves in Python, making it so that the python interpreter would only need to start once and allowing the separate methods to be pre-compiled python.  This should decrease overall execution time, making the end-user experience slightly better overall by decreasing the time they have to wait on the server.  We’re talking about fractions of a second, but I have some operations which bulk-create directories in SVN or otherwise cause tens or hundreds of new revisions to be created at one time (which is necessary for the way some of my integration processes work), so it actually adds up.

This is also an excuse for me to learn Python, so bear with me if the code below is horrible.  Actually, don’t bear with me – leave a comment letting me know how it should have been done. :)

Read the rest of this entry »


xfs v/s reiserfs storage

No Comments »

So, since I have to rebuild my mp3 library anyway, I thought I’d do a comparison between storing my mp3s on either reiserfs or xfs.  I already know that reiserfs is horrible for recovery, but hopefully I won’t need that.  Reiser is supposed to be good for storage because of the tail-packing thing, though.

I’ve recovered about 18GB of songs now, the biggest file is about 50MB; the average is about 8MB.  Somewhat surprisingly, the xfs filesystem (/mnt/a) actually is using less space to store the identical directory structure (artist/album/mp3).

 sauer@humpy:~$ for D in /srv/nfs4/music /mnt/a;
  do find $D | wc -l; done
 1589
 1589
 sauer@humpy:~$ du -ks /srv/nfs4/music /mnt/a
 12380231        /srv/nfs4/music
 12369836        /mnt/a
 sauer@humpy:~$ df -k /srv/nfs4/music /mnt/a
 Filesystem           1K-blocks      Used Available Use% Mounted on
 /dev/mapper/idevol-music
 52427196  12414684  40012512  24% /srv/nfs4/music
 /dev/mapper/idevol-music2
 52403200  12403660  39999540  24% /mnt/a
 sauer@humpy:~$ sed -n '/music/p' /proc/mounts
 /dev/mapper/idevol-music /srv/nfs4/music reiserfs rw,noatime 0 0
 /dev/mapper/idevol-music2 /mnt/a xfs rw,relatime,attr2,delaylog,logbsize=64k,sunit=128,swidth=384,noquota 0 0

So, since xfs also recovers faster and is more actively maintained, I’m switching to xfs.