dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: dd to a striped device with 9 disks gets much lower throughput when oflag=direct used
Date: Fri, 27 Jan 2012 07:54:47 +0100	[thread overview]
Message-ID: <4F224A37.2090308@suse.de> (raw)
In-Reply-To: <CACyXjPzWjBz0=btbL0Gx_qoxRQs7wy9m=dY1--xL29uszTpmFA@mail.gmail.com>

On 01/27/2012 02:06 AM, Richard Sharpe wrote:
> Hi,
> 
> Perhaps I am doing something stupid, but I would like to understand
> why there is a difference in the following situation.
> 
> I have defined a stripe device thusly:
> 
>      "echo 0 17560535040 striped 9 8 /dev/sdd 0 /dev/sde 0 /dev/sdf 0
> /dev/sdg 0 /dev/sdh 0 /dev/sdi 0 /dev/sdj 0 /dev/sdk 0 /dev/sdl 0 |
> dmsetup create stripe_dev"
> 
> Then is did the following:
> 
>     dd if=/dev/zero of=/dev/mapper/stripe_dev bs=262144 count=1000000
> 
> and I got 880 MB/s
> 
> However, when I changed that command to:
> 
>     dd if=/dev/zero of=/dev/mapper/stripe_dev bs=262144 count=1000000
> oflag=direct
> 
> I get 210 MB/s reliably.
> 
> The system in question is a 16 core (probably two CPUs) Intel Xeon
> E5620 @2.40Ghz with 64GB of memory and 12 7200PRM SATA drives
> connected to an LSI SAS controller but set up as a JBOD of 12 drives.
> 
> Why do I see such a big performance difference? Does writing to the
> device also use the page cache if I don't specify DIRECT IO?
> 
Yes. All I/O using read/write calls is going via the pagecache.
The only way to circumvent this is to use DIRECT_IO.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2012-01-27  6:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27  1:06 dd to a striped device with 9 disks gets much lower throughput when oflag=direct used Richard Sharpe
2012-01-27  6:54 ` Hannes Reinecke [this message]
2012-01-27  8:52 ` Christoph Hellwig
2012-01-27 15:03   ` Richard Sharpe
2012-01-27 15:16     ` Zdenek Kabelac
2012-01-27 15:28       ` Richard Sharpe
2012-01-27 17:24         ` Zdenek Kabelac
2012-01-27 17:48           ` Richard Sharpe
2012-01-27 18:06             ` Zdenek Kabelac

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=4F224A37.2090308@suse.de \
    --to=hare@suse.de \
    --cc=dm-devel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).