All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Mike Fedyk <mfedyk@matchmail.com>
Cc: Oleg Drokin <green@namesys.com>,
	Jeff Breidenbach <jbreiden@parc.com>,
	Hans Reiser <reiser@namesys.com>,
	reiserfs-list@namesys.com
Subject: Re: Prereading block device doesn't help filesystems
Date: 03 Jun 2003 14:19:26 -0400	[thread overview]
Message-ID: <1054664366.18197.26.camel@tiny.suse.com> (raw)
In-Reply-To: <20030603174935.GA4044@matchmail.com>

On Tue, 2003-06-03 at 13:49, Mike Fedyk wrote:
> On Tue, Jun 03, 2003 at 09:33:36AM +0400, Oleg Drokin wrote:
> > (e.g. dd if=/dev/hdb1 /dev/zero bs=1024k count=500 (replace 500 with the half of your RAM
> > in megabytes) and you have large enough RAM, there is a chance that this will cache
> > enough data to keep stuff moving more quickly. 
> 
> That won't work either.
> 
> Basically you're copying the data into buffer cache, and the page cache
> won't be able to pick it up, so you're going to read from the disk twice.
> Even with Andrea's buffercache in pagecache from 2.4.10 it doesn't do the
> aliasing IIRC.  And there were some long threads where Linus said he
> wouldn't accept patches to do the aliasing either.
> 
> Don't know if he has changed his mind in 2.5 though...
> 

There are two caches used by reiserfs.  The page cache has file data,
and the buffer cache has FS metadata.  The buffer cache doesn't really
exist anymore, it's really just the page cache for the file
corresponding to the block device.

So, if you dd if=/dev/hdb1 of=/dev/zero, you are reading into the page
cache of the block device which means you are populating the metadata
cache for reiserfs as well.

With packed tails and many small files, this represents the bulk of the
data on the FS, and it should make a performance difference if you have
enough ram to make it worth while, and your access patterns keep the
blocks in cache.

-chris



  reply	other threads:[~2003-06-03 18:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 20:07 disk or reiserfs problem? Jeff Breidenbach
2003-05-29  5:45 ` Oleg Drokin
2003-06-02 18:36   ` Hans Reiser
2003-06-02 20:00     ` Jeff Breidenbach
2003-06-03  5:33       ` Oleg Drokin
2003-06-03 17:49         ` Prereading block device doesn't help filesystems Mike Fedyk
2003-06-03 18:19           ` Chris Mason [this message]
2003-06-05 13:20         ` disk or reiserfs problem? Hans Reiser
2003-06-05 13:38           ` Nikita Danilov
2003-06-03  5:23     ` Oleg Drokin

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=1054664366.18197.26.camel@tiny.suse.com \
    --to=mason@suse.com \
    --cc=green@namesys.com \
    --cc=jbreiden@parc.com \
    --cc=mfedyk@matchmail.com \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    /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.