lkml.org 
[lkml]   [2008]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, RFC] ext4: Use preallocation when reading from the inode table
Andreas Dilger wrote:
> On Sep 23, 2008 10:16 +0100, Alan Cox wrote:
>
>> On Mon, 22 Sep 2008 20:35:23 -0400
>> "Theodore Ts'o" <tytso@mit.edu> wrote:
>>
>>> With modern hard drives, reading 64k takes roughly the same time as
>>> reading a 4k block. So request adjacent inode table blocks to reduce
>>> the time it takes when iterating over directories (especially when doing
>>> this in htree sort order) in a cold cache case. With this patch, the
>>> time it takes to run "git status" on a kernel tree after flushing the
>>> caches via "echo 3 > /proc/sys/vm/drop_caches", is reduced by 21%.
>>>
>>> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
>>>
>> Acked-by: Alan Cox <alan@redhat.com>
>>
>> I'm actually suprised that 16 is the magic tuning number you've used and
>> a bigger one isn't even more of a win
>>
>
> I was going to suggest making this at least a #defined constant instead
> of hard coding the values there. Making it a mount option and/or /proc
> value would allow further testing.
>
> Cheers, Andreas
> --
> Andreas Dilger
> Sr. Staff Engineer, Lustre Group
> Sun Microsystems of Canada, Inc.
>
>

I think that Alan is probably right - the magic number for modern drives
is probably closer to 256K. Having it be a /sys tunable (with a larger
default) would be a nice way to verify this.

Ric



\
 
 \ /
  Last update: 2008-09-23 14:21    [W:0.310 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site