Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: fio@vger.kernel.org
Subject: Re: Writing to /dev/null with fio
Date: Tue, 2 Feb 2010 09:53:05 +0100	[thread overview]
Message-ID: <20100202085305.GA13771@kernel.dk> (raw)
In-Reply-To: <20100202083108.GZ13771@kernel.dk>

On Tue, Feb 02 2010, Jens Axboe wrote:
> On Tue, Feb 02 2010, Bart Van Assche wrote:
> > On Tue, Feb 2, 2010 at 9:19 AM, Jens Axboe <jens.axboe@oracle.com> wrote:
> > > On Tue, Feb 02 2010, Bart Van Assche wrote:
> > >> The reason I started running such silly tests is because I noticed
> > >> that tests with dd and a small block size complete in a shorter time
> > >> than tests with fio for a fast storage device (e.g. remote RAM disk
> > >> accessed via SRP or iSER). Do the two tests below trigger similar
> > >> system calls ? The ratio of fio time / dd time is about 1.50 for block
> > >> size 512 and about 1.15 for block size 4096.
> > >
> > > Fio definitely has more overhead than a simple read() to buf, write buf
> > > to /dev/null. If you switch off the stat calculations, it'll drop
> > > somewhat (use --gtod_reduce=1). But even then it's going to be slower
> > > than dd. Fio is modular and supports different IO engines etc, so the IO
> > > path is going to be a lot longer than with dd. The flexibility of fio
> > > does come at a cost. If you time(1) fio and dd, you'll most likely see a
> > > lot more usr time in fio.
> > >
> > > That said, it is probably time to do some profiling and make sure that
> > > fio is as fast as it can be.
> > 
> > That would definitely be appreciated. I would like to switch from dd
> > to fio for storage system benchmarking, something I can't do yet
> > because of the different results reported by the two tools.
> 
> So the first thing I noticed is that you get an lseek() because fio
> doesn't track the sequential nature of that job. How close do you get
> for bs=512 with using --gtod_reduce=1 and commenting out the lseek() in
> engines/sync.c:fio_syncio_prep()?

I committed a fix for this, it'll do it automatically now if you use
latest -git. A quick test here on my desktop machine:

fio --bs=4k --size=64G --buffered=1 --rw=write --verify=0
--name=/dev/null --gtod_reduce=1 --disk_util=0

10378MB/s

fio --bs=512 --size=8G --buffered=1 --rw=write --verify=0
--name=/dev/null --gtod_reduce=1 --disk_util=0

1306MB/s

dd if=/dev/zero of=/dev/null bs=4k count=16M
68719476736 bytes (69 GB) copied, 9,71235 s, 7,1 GB/s

dd if=/dev/zero of=/dev/null bs=512 count=8M
4294967296 bytes (4,3 GB) copied, 3,3574 s, 1,3 GB/s

So the same for 512b buffers, fio is much quicker for 64k (must be due
to proper aligning). I'll boot the big box and see what that says.

-- 
Jens Axboe


  reply	other threads:[~2010-02-02  8:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02  7:38 Writing to /dev/null with fio Bart Van Assche
2010-02-02  7:41 ` Jens Axboe
2010-02-02  8:01   ` Bart Van Assche
2010-02-02  8:19     ` Jens Axboe
2010-02-02  8:24       ` Bart Van Assche
2010-02-02  8:31         ` Jens Axboe
2010-02-02  8:53           ` Jens Axboe [this message]
2010-02-02  9:06             ` Bart Van Assche
2010-02-02  9:08             ` Jens Axboe

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=20100202085305.GA13771@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=bvanassche@acm.org \
    --cc=fio@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