On Thu, 2004-12-02 at 11:58 -0500, Daniel Veillard wrote: > On Thu, Dec 02, 2004 at 11:48:56AM -0500, David Zeuthen wrote: > > Not sure; the big boost really comes from reordering the files on the > > filesystem - running readahead (which takes 11 seconds) only gives me a > > I'm looking into this. a mix of creating a new directory, copying > the file there, then unlinking, linking and unlinking the new copies to the > old name is more likely to help. The problem is that it's also bad for > the current session where that change is done since you will end up with > multiple in-memory copies of all system libraries... > It is gonna be a bit tricky to set-up, either as a post-install step > or very early on during boot. It's very easy to break too ... > To me it makes more sense to look at this on the block level than on the file level; remember, a lot the files in my readahead set stems from stat'ing files - for example, there are more than 2200 distinct .png files in my readahead set. We probably only need one sector from most of those (the inode) rather than the entire file. I'm almost positive it requires kernel changes to do this the right way; one naive idea is to have a userspace daemon, capturing what blocks are read when (kernel tells this daemon using the kernel events layer). This would run in the first three minutes on each and every boot. When the system is idle (and only when running on AC power!) another daemon rearranges blocks on the disk. What blocks to rearrange could be the result of a computation involving several three-minute result sets. Cheers, David