What's the fastest filesystem for developer builds?

I'm putting together a Linux box that will act as a continuous integration build server; we'll mostly build Java stuff, but I think this question applies to any compiled language.

What filesystem and configuration settings should I use? (For example, I know I won't need atime for this!) The build server will spend a lot of time reading and writing small files, and scanning directories to see which files have been modified.

UPDATE: Data integrity is a low priority in this case; it's just a build machine ... the final artifacts will be zipped up and archived elsewhere. If the filesystem on the build machine gets corrupted and loses all data, we can just wipe and re-image; builds will continue running as before.


Solution 1:

Use ext4fs as the base filesystem with a few speedup options like

noatime,data=writeback,nobh,barrier=0,commit=300

Then union mount a tmpfs ramdisk on top of that so that files written during the builds get the benefits of the ramdisk. Either change the build procedure to move the resulting binaries off the tmpfs at the end of the build, or merge the tmpfs back into the ext4fs before unmounting.

Solution 2:

Fastest filesystem? tmpfs mounted out of available RAM, with noatime set.

This is only viable if you have a procedure for checking out everything needed to build your source tree (since the contents of a tmpfs filesystem will go away when you reboot), and if source and objects fit into a reasonable corner of your available RAM (with enough left over to run your compiler & linker without swapping). That said you cant beat working out of RAM for speed..

Solution 3:

To the answer of Michael Dillon i can add that you can create ext4 filesystem with few options :

mkfs.ext4 -O dir_index,extent -i 8096 /dev/<disk>


dir_index
    Use hashed b-trees to speed up lookups in large directories.

extent 
    Instead of using the indirect block scheme for storing the location of data blocks in an inode, use extents instead.  This is a  much  more  efficient  encoding  which  speeds  up filesystem access, especially for large files.

-i 8096 gives you more inodes per size, useful because building environments create a lot of files.