Here's an interesting question. For something like CVS checkouts from a local CVS mirror or ccache-using builds, would putting the CVS repository or ccache data store on a different hard drive from the sourcedir or objdir (respectively) make things faster or slower? Especially for my typical use case, which is updating 4 or more trees all from the same CVS repository, it seems there could be a win from having the accesses happen on different disks... Is there any work that's been done on testing this? Or should I just time both and see?
Posted by bzbarsky at May 14, 2005 12:26 AMputting ccache on the same partition as the objdir and turning on hard linking should help. See http://weblogs.mozillazine.org/darin/archives/005504.html and http://weblogs.mozillazine.org/roc/archives/2005/01/sharing_binarie.html
Posted by: basic on May 14, 2005 3:39 AMI'm not sure about ccache, but I have some experience with having CVS repositories on a different machine.
When I was at UChicago I had a Windows laptop and a Linux desktop. The hard disk on my Windows laptop was really slow, so I set up a Samba share on my Linux desktop with the source tree, mapped it as a drive on Windows and I used that as my sourcedir. The objdir was on my Windows laptop.
Because I/O for sourcedir/objdir was happening on different disks, I found that compilation was significantly faster, even though the source tree wasn't even on the same machine!
It's possible though that this speed gain is limited to scenarios where the local hard disk is very slow, and the hard disk on the machine you're accessing over ethernet is much faster (as was my case). YMMV, but it never hurts to try!
Posted by: Ali Ebrahim on May 15, 2005 4:39 AMThe ccache hard link thing has the problem roc describes....
Ali, I'd probably keep the sourcedir and objdir on the same hard drive (just due to various space and partitioning constraints), but I'm basically thinking of pushing all the sourcedirs and objdirs off the hard drive the CVS repository and ccache live on.
Posted by: Boris on May 15, 2005 10:27 AMI would say with a great deal of certainty that splitting I/O tasks across drives will be much faster in this case. If you're reading from one place and writing to another, especially with a lot of small files, the latency of putting stuff "on the wire" for the SCSI bus is far outweighed by the accumulated latency for the repeated movement of the drive heads.
Assuming the reading drive can read the data in question as fast as the other can write it, it'll be a net speedup, probably very significant.
Posted by: Mike on May 17, 2005 11:14 AM