All of lore.kernel.org
 help / color / mirror / Atom feed
From: arlie@worldash.org (Arlie Stephens)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Forum for asking questions related to block device drivers
Date: Thu, 11 Apr 2013 15:06:11 -0700	[thread overview]
Message-ID: <20130411220611.GA12994@worldash.org> (raw)
In-Reply-To: <CAOb=_x+JZ-T0Qyx3fDH_wK2TLy20rTx-edd689_StU9sP1EyNQ@mail.gmail.com>

Hi Neha,

On Apr 11 2013, neha naik wrote:
> HI Greg,
>    Thanks a lot. Everything you said made complete sense to me but when i
> tried running with following options my read is so slow (basically with
> direct io, that with 1MB/s it will just take 32minutes to read 32MB data)
> yet my write is doing fine. Should i use some other options of dd (though i
> understand that with direct we bypass all caches, but direct doesn't
> guarantee that everything is written when call returns to user for which i
> am using fdatasync). 

I'm no kind of expert, but the last time I found myself timing dd, I
found that the block size was critical, and 4096 bytes is a very small
block size, from a dd point of view. On freebsd at least, cranking it
up to at least 1MB did great things for its performance. What happens 
with "bs=1M" ? 

> time dd if=/dev/shm/image of=/dev/sbd0 bs=4096 count=262144 oflag=direct
> conv=fdatasync
> time dd if=/dev/pdev0 of=/dev/null bs=4096 count=2621262144+0 records in
> 262144+0 records out
> 1073741824 bytes (1.1 GB) copied, 17.7809 s, 60.4 MB/s
> 
> real    0m17.785s
> user    0m0.152s
> sys    0m1.564s
> 
> 
> I interrupted the dd for read because it was taking too much time with
> 1MB/s :
> time dd if=/dev/pdev0 of=/dev/null bs=4096 count=262144 iflag=direct
> conv=fdatasync
> ^C150046+0 records in
> 150045+0 records out
> 614584320 bytes (615 MB) copied, 600.197 s, 1.0 MB/s
> 
> 
> real    10m0.201s
> user    0m2.576s
> sys    0m0.000s
> 
> Thanks,
> Neha

  reply	other threads:[~2013-04-11 22:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 20:53 Forum for asking questions related to block device drivers neha naik
2013-04-11  5:15 ` Rajat Sharma
2013-04-11 15:09   ` neha naik
2013-04-11 17:53     ` Rajat Sharma
2013-04-11 18:50       ` neha naik
2013-04-11 19:49         ` Greg Freemyer
2013-04-11 20:48           ` neha naik
2013-04-11 22:06             ` Arlie Stephens [this message]
2013-04-11 23:02             ` Greg Freemyer
2013-04-12 18:01               ` neha naik
2013-04-15  7:02         ` simple question about struct pointer Ben Wu
2013-04-15  9:48           ` arshad hussain
2013-04-11  7:47 ` Forum for asking questions related to block device drivers Bjørn Mork

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=20130411220611.GA12994@worldash.org \
    --to=arlie@worldash.org \
    --cc=kernelnewbies@lists.kernelnewbies.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 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.