All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ric Wheeler <rwheeler@redhat.com>
To: Theodore Tso <tytso@mit.edu>, Ric Wheeler <rwheeler@redhat.com>,
	Andreas Dilger <adilger@sun.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RFC] ext4: Use preallocation when reading from the inode table
Date: Wed, 24 Sep 2008 09:23:34 -0400	[thread overview]
Message-ID: <48DA3F56.8090806@redhat.com> (raw)
In-Reply-To: <20080924013014.GA9747@mit.edu>

Theodore Tso wrote:
> On Tue, Sep 23, 2008 at 08:18:54AM -0400, Ric Wheeler wrote:
>   
>> 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.
>>     
>
> I've played with this a bit, and with the "git status" workload,
> increasing the magic number beyond 16 (64k) doesn't actually help,
> because the number of inodes we need to touch wasn't big enough.
>
> So I switched to a different workload, which ran "find /path -size 0
> -print" with a much larger directory hierarchy.  With that workload I
> got the following results:
>
> ra_bits	ra_blocks  ra_kb  seconds  % improvement
> 0	   1	     4	  53.3		 -
> 1	   2	     8	  47.3		11.3%
> 2	   4	    16	  41.7		21.8%
> 3	   8	    32	  37.5		29.6%
> 4	  16	    64	  34.4		35.5%
> 5	  32	   128	  32		40.0%
> 6	  64	   256	  30.7		42.4%
> 7	 128	   512	  28.8		46.0%
> 8	 256	  1024	  28.3		46.9%
> 9	 512	  2048	  27.5		48.4%
>
> Given these numbers, I'm using a default of inode_readahead_bits of 5
> (i.3., 32 blocks, or 128k for 4k blocksize filesystems).  For a
> workload that is 100% stat-based, without any I/O, it is possible to
> get better results by using a higher number, yes, but I'm concerned
> that a larger readahead may end up interfering with other reads.  We
> need to run some other workloads to be sure a larger number won't
> cause problems before we go more aggressive on this parameter.
>
> I'll send the revised patch in another message.
>
> 					- Ted
>   

That sounds about right for modern S-ATA/SAS drives. I would expect that 
having this be a tunable knob might help for some types of storage (SSD 
might not care, but should be faster in any case?).

ric


  reply	other threads:[~2008-09-24 13:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23  0:35 [PATCH, RFC] ext4: Use preallocation when reading from the inode table Theodore Ts'o
2008-09-23  9:16 ` Alan Cox
2008-09-23 11:50   ` Andreas Dilger
2008-09-23 12:18     ` Ric Wheeler
2008-09-24  1:30       ` Theodore Tso
2008-09-24 13:23         ` Ric Wheeler [this message]
2008-09-24 14:20           ` Chris Mason
2008-09-24 20:35           ` Theodore Tso
2008-09-25 23:40             ` Andreas Dilger
2008-09-25 23:40               ` Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48DA3F56.8090806@redhat.com \
    --to=rwheeler@redhat.com \
    --cc=adilger@sun.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.