From: Jens Axboe <axboe@suse.de>
To: Ian Godin <Ian.Godin@lowrydigital.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Drive performance bottleneck
Date: Thu, 3 Feb 2005 17:06:23 +0100 [thread overview]
Message-ID: <20050203160623.GA20696@suse.de> (raw)
In-Reply-To: <c4fc982390674caa2eae4f252bf4fc78@lowrydigital.com>
On Wed, Feb 02 2005, Ian Godin wrote:
>
> I am trying to get very fast disk drive performance and I am seeing
> some interesting bottlenecks. We are trying to get 800 MB/sec or more
> (yes, that is megabytes per second). We are currently using
> PCI-Express with a 16 drive raid card (SATA drives). We have achieved
> that speed, but only through the SG (SCSI generic) driver. This is
> running the stock 2.6.10 kernel. And the device is not mounted as a
> file system. I also set the read ahead size on the device to 16KB
> (which speeds things up a lot):
>
> blockdev --setra 16834 /dev/sdb
>
> So here are the results:
>
> $ time dd if=/dev/sdb of=/dev/null bs=64k count=1000000
> 1000000+0 records in
> 1000000+0 records out
> 0.27user 86.19system 2:40.68elapsed 53%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (0major+177minor)pagefaults 0swaps
>
> 64k * 1000000 / 160.68 = 398.3 MB/sec
>
> Using sg_dd just to make sure it works the same:
>
> $ time sg_dd if=/dev/sdb of=/dev/null bs=64k count=1000000
> 1000000+0 records in
> 1000000+0 records out
> 0.05user 144.27system 2:41.55elapsed 89%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (17major+5375minor)pagefaults 0swaps
>
> Pretty much the same speed. Now using the SG device (sg1 is tied to
> sdb):
>
> $ time sg_dd if=/dev/sg1 of=/dev/null bs=64k count=1000000
> Reducing read to 16 blocks per loop
> 1000000+0 records in
> 1000000+0 records out
> 0.22user 66.21system 1:10.23elapsed 94%CPU (0avgtext+0avgdata
> 0maxresident)k
> 0inputs+0outputs (0major+2327minor)pagefaults 0swaps
>
> 64k * 1000000 / 70.23 = 911.3 MB/sec
>
> Now that's more like the speeds we expected. I understand that the
> SG device uses direct I/O and/or mmap memory from the kernel. What I
> cannot believe is that there is that much overhead in going through the
> page buffer/cache system in Linux.
It's not going through the page cache that is the problem, it's the
copying to user space. Have you tried using O_DIRECT? What kind of
speeds are you getting with that?
--
Jens Axboe
next prev parent reply other threads:[~2005-02-03 16:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-03 2:24 Ian Godin
2005-02-03 3:56 ` Bernd Eckenfels
2005-02-03 16:49 ` Ian Godin
2005-02-03 16:06 ` Jens Axboe [this message]
2005-02-03 17:40 ` Nuno Silva
2005-02-03 18:08 ` Ian Godin
2005-02-03 19:03 ` Paulo Marques
2005-02-04 19:36 ` Andy Isaacson
2005-02-04 9:32 ` Andrew Morton
2005-02-04 22:51 ` Lincoln Dale
2005-02-04 23:07 ` Andrew Morton
2005-02-06 4:25 ` Nuno Silva
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=20050203160623.GA20696@suse.de \
--to=axboe@suse.de \
--cc=Ian.Godin@lowrydigital.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome