public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: "Ismail Dönmez" <ismail@pardus.org.tr>, linux-kernel@vger.kernel.org
Subject: Re: Abysmal disk performance, how to debug?
Date: Sat, 20 Jan 2007 21:28:21 +0100	[thread overview]
Message-ID: <20070120202821.GD25307@1wt.eu> (raw)
In-Reply-To: <Pine.LNX.4.63.0701202105210.23674@gockel.physik3.uni-rostock.de>

Hi Tim,

On Sat, Jan 20, 2007 at 09:10:22PM +0100, Tim Schmielau wrote:
> On Sat, 20 Jan 2007, Ismail Dönmez wrote:
> 
> > 20 Oca 2007 Cts 19:45 tarihinde ??unlar?? yazm????t??n??z:
> > [...]
> > > > vaio cartman # hdparm -tT /dev/hda
> > > >
> > > > /dev/hda:
> > > >  Timing cached reads:   1576 MB in  2.00 seconds = 788.18 MB/sec
> > > >  Timing buffered disk reads:   74 MB in  3.01 seconds =  24.55 MB/sec
> > > >
> > > >
> > > > [~]> time dd if=/dev/zero of=/tmp/1GB bs=1M count=1024
> > > > 1024+0 records in
> > > > 1024+0 records out
> > > > 1073741824 bytes (1,1 GB) copied, 77,2809 s, 13,9 MB/s
> > > >
> > > > real    1m17.482s
> > > > user    0m0.003s
> > > > sys     0m2.350s
> > >
> > > That's not bad at all ! I suspect that if your system becomes unresponsive,
> > > it's because real writes start when the cache is full. And if you fill
> > > 512 MB of RAM with data that you then need to flush on disk at 14 MB/s, it
> > > can take about 40 seconds during which it might be difficult to do
> > > anything.
> > >
> > > Try lowering the cache flush starting point to about 10 MB if you want
> > > (2% of 512 MB) :
> > >
> > > # echo 2 >/proc/sys/vm/dirty_ratio
> > > # echo 2 >/proc/sys/vm/dirty_background_ratio
> > 
> > After that I get,
> > 
> > [~]>  time dd if=/dev/zero of=/tmp/1GB bs=1M count=1024
> > 1024+0 records in
> > 1024+0 records out
> > 1073741824 bytes (1,1 GB) copied, 41,7005 s, 25,7 MB/s
> > 
> > real    0m41.926s
> > user    0m0.007s
> > sys     0m2.500s
> > 
> > 
> > not bad! thanks :)
> 
> Note that these dd "benchmarks" are completely bogus, because the data 
> doesn't actually get written to disk in that time. For some enlightening 
> data, try
> 
>   time dd if=/dev/zero of=/tmp/1GB bs=1M count=1024; time sync
> 
> The dd returns as soon as all data could be buffered in RAM. Only sync 
> will show how long it takes to actually write out the data to disk.

While I 100% agree with you on this, I'd like to note that I don't agree
with the following statement :

> also explains why you see better results is writeout starts earlier.

The results should be better when writeout starts later since most of
the transfer will have been performed at RAM speed. That's what happens
with the user above with 2 GB RAM. But in case of the VAIO with 512 MB,
there's really something strange IMHO. I suspect it has two RAM areas,
one fast and one slow (probably one two large non-cacheable area for a
shared video or such a crap, which can be avoided when reducing the
cache size).

Best regards,
Willy


  parent reply	other threads:[~2007-01-20 20:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-20 17:20 Abysmal disk performance, how to debug? Ismail Dönmez
2007-01-20 17:45 ` Willy Tarreau
2007-01-20 17:52   ` Ismail Dönmez
2007-01-20 18:03     ` Willy Tarreau
2007-01-20 18:06       ` Ismail Dönmez
2007-01-20 19:44       ` Sunil Naidu
2007-01-20 19:56         ` Stephen Clark
2007-01-20 20:09           ` Willy Tarreau
2007-01-21  3:41             ` Stephen Clark
2007-01-21  4:06               ` Gene Heskett
2007-01-27 19:43             ` Bill Davidsen
2007-02-03 17:22               ` Elladan
2007-01-20 20:05         ` Willy Tarreau
2007-01-20 20:11           ` Ismail Dönmez
2007-01-20 20:10     ` Tim Schmielau
2007-01-20 20:16       ` Ismail Dönmez
2007-01-20 20:19         ` Willy Tarreau
2007-01-20 20:28           ` Tim Schmielau
2007-01-20 20:31             ` Willy Tarreau
2007-01-20 20:21         ` Tim Schmielau
2007-01-20 20:28       ` Willy Tarreau [this message]
2007-01-20 20:39         ` Tim Schmielau
2007-01-20 21:24           ` Willy Tarreau
2007-01-20 21:41             ` Tim Schmielau
2007-01-20 21:12       ` Sunil Naidu
2007-01-20 22:00         ` Tim Schmielau
2007-01-20 23:47           ` Sunil Naidu

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=20070120202821.GD25307@1wt.eu \
    --to=w@1wt.eu \
    --cc=ismail@pardus.org.tr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@physik3.uni-rostock.de \
    /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