All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Nikolay Kichukov <hijacker@oldum.net>
Cc: Roman Mamedov <rm@romanrm.ru>,
	Liam Kurmos <quantum.leaf@gmail.com>,
	Roberto Spadim <roberto@spadim.com.br>,
	Brad Campbell <lists2009@fnarfbargle.com>,
	Drew <drew.kay@gmail.com>,
	linux-raid@vger.kernel.org
Subject: Re: mdadm raid1 read performance
Date: Thu, 5 May 2011 19:30:39 +1000	[thread overview]
Message-ID: <20110505193039.7c75dd80@notabene.brown> (raw)
In-Reply-To: <4DC25A71.6090705@oldum.net>

On Thu, 05 May 2011 11:06:09 +0300 Nikolay Kichukov <hijacker@oldum.net>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> It seems like he is reading directly from the raid device and not through the filesystem. So there are no filesystem
> caches in this way.

A block device is actually implemented a lot like a filesystem which
contains a single file with a trivial mapping from file-block to device-block.

In any case, reading from a block device most definitely does go through the
page cache, and repeatedly reading from a device which is substantially
smaller than memory will cause subsequent reads to come from the cache.

NeilBrown


> 
> Cheers,
> - -Nik
> 
> On 05/05/2011 07:06 AM, Roman Mamedov wrote:
> > On Thu, 5 May 2011 00:08:59 +0100
> > Liam Kurmos <quantum.leaf@gmail.com> wrote:
> > 
> >> in my tests i read 1GB and throw away the data.
> >> dd if=/dev/md0 of=/dev/null bs=1M count=1000
> > 
> > If you have enough RAM for disk cache, on the second and further consecutive
> > invocations of this you will be reading mostly from the cache, giving you an
> > incorrect inflated result. So either don't forget to drop filesystem caches
> > between runs, or just test read performance with "hdparm -t /dev/mdX" instead.
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQEcBAEBAgAGBQJNwlpxAAoJEDFLYVOGGjgXHS0IAJAVFwR0Y0SD6G4CTaViqNCv
> 32s/VCZWTZMzXiLOrY5xCGFiuqPurmGLy/+aW+HeEYShMndkZQ8H8ZHlSx5L3OoH
> SQnWS7gP5hUn2w9qamhtFk9iPWpx18ZzVqN/k9WyAWhY4Ro20G8PWI3/T4Q3+zam
> WYJ6KglllX+BuQYVhmhwB1KGVFhmpQXBXKWVrcGIB7vyGnM5K9fWLbxd6VvghZvd
> qpfrmPO2WvuqpxCS+YcZTqEg7osbzNB+W/6DMJ7BpxyUcxIEyXwBwZSUxsZe3WWo
> oTfj0XUaVc17TPfKMCyLfgm+K6f+IJfKky5e5mJyFCjesDhqFngkpilft9xNxq0=
> =qsmJ
> -----END PGP SIGNATURE-----


  parent reply	other threads:[~2011-05-05  9:30 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04  0:07 mdadm raid1 read performance Liam Kurmos
2011-05-04  0:57 ` John Robinson
2011-05-06 20:44   ` Leslie Rhorer
2011-05-06 21:56     ` Keld Jørn Simonsen
2011-05-04  0:58 ` NeilBrown
2011-05-04  5:30   ` Drew
2011-05-04  6:31     ` Brad Campbell
2011-05-04  7:42       ` Roberto Spadim
2011-05-04 23:08         ` Liam Kurmos
2011-05-04 23:35           ` Roberto Spadim
2011-05-04 23:36           ` Brad Campbell
2011-05-04 23:45           ` NeilBrown
2011-05-04 23:57             ` Roberto Spadim
2011-05-05  0:14             ` Liam Kurmos
2011-05-05  0:20               ` Liam Kurmos
2011-05-05  0:25                 ` Roberto Spadim
2011-05-05  0:40                   ` Liam Kurmos
2011-05-05  7:26                     ` David Brown
2011-05-05 10:41                       ` Keld Jørn Simonsen
2011-05-05 11:38                         ` David Brown
2011-05-06  4:14                           ` CoolCold
2011-05-06  7:29                             ` David Brown
2011-05-06 21:05                       ` Leslie Rhorer
2011-05-07 10:37                         ` David Brown
2011-05-07 10:58                           ` Keld Jørn Simonsen
2011-05-05  0:24               ` Roberto Spadim
2011-05-05 11:10             ` Keld Jørn Simonsen
2011-05-06 21:20               ` Leslie Rhorer
2011-05-06 21:53                 ` Keld Jørn Simonsen
2011-05-07  3:17                   ` Leslie Rhorer
2011-05-05  4:06           ` Roman Mamedov
2011-05-05  8:06             ` Nikolay Kichukov
2011-05-05  8:39               ` Liam Kurmos
2011-05-05  8:49                 ` Liam Kurmos
2011-05-05  9:30               ` NeilBrown [this message]
2011-05-04  7:48       ` David Brown

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=20110505193039.7c75dd80@notabene.brown \
    --to=neilb@suse.de \
    --cc=drew.kay@gmail.com \
    --cc=hijacker@oldum.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=lists2009@fnarfbargle.com \
    --cc=quantum.leaf@gmail.com \
    --cc=rm@romanrm.ru \
    --cc=roberto@spadim.com.br \
    /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.