Re: optimal file order for reading from disk
From: bert hubert
Date: Tue Jun 14 2005 - 07:14:27 EST
On Tue, Jun 14, 2005 at 12:21:40PM +0100, P@xxxxxxxxxxxxxx wrote:
> I know this will be dependent on filesystem, I/O scheduler, ...
> but given a list of files, what is the best (filesystem
> agnostic) order to read from disk (to minimise seeks).
>
> Should I sort by path, inode number, getdents, or something else?
I know several projects that sort on inode number and benefit from that,
sometimes in a big way. The effect of this will probably be less on a
matured filesystem image.
I can't really explain why it helps though. I don't think the kernel will do
'crossfile readahead', although your disk might do so.
Google on 'orlov allocator', is enlightning.
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/