public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
	Mike Galbraith <efault@gmx.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [ext3][kernels >= 2.6.20.7 at least] KDE going comatose when FS  is under heavy write load (massive starvation)
Date: Mon, 30 Apr 2007 08:56:47 +0200	[thread overview]
Message-ID: <20070430065646.GC21015@kernel.dk> (raw)
In-Reply-To: <alpine.LFD.0.98.0704280849150.9964@woody.linux-foundation.org>

On Sat, Apr 28 2007, Linus Torvalds wrote:
> > The main problem is that if the user extracts tar archive, tar eventually
> > blocks on writeback I/O --- O.K. But if bash attempts to write one page to
> > .bash_history file at the same time, it blocks too --- bad, the user is
> > annoyed.
> 
> Right, but it's actually very unlikely. Think about it: the person who 
> extracts the tar-archive is perhaps dirtying a thousand pages, while the 
> .bash_history writeback is doing a single one. Which process do you think 
> is going to hit the "oops, we went over the limit" case 99.9% of the time?
> 
> The _really_ annoying problem is when you just have absolutely tons of 
> memory dirty, and you start doing the writeback: if you saturate the IO 
> queues totally, it simply doesn't matter _who_ starts the writeback, 
> because anybody who needs to do any IO at all (not necessarily writing) is 
> going to be blocked.
> 
> This is why having gigabytes of dirty data (or even "just" hundreds of 
> megs) can be so annoying.
> 
> Even with a good software IO scheduler, when you have disks that do tagged 
> queueing, if you fill up the disk queue with a few dozen (depends on the 
> disk what the queue limit is) huge write requests, it doesn't really 
> matter if the _software_ queuing then gives a big advantage to reads 
> coming in. They'll _still_ be waiting for a long time, especially since 
> you don't know what the disk firmware is going to do.
> 
> It's possible that we could do things like refusing to use all tag entries 
> on the disk for writing. That would probably help latency a _lot_. Right 
> now, if we do writeback, and fill up all the slots on the disk, we cannot 
> even feed the disk the read request immediately - we'll have to wait for 
> some of the writes to finish before we can even queue the read to the 
> disk.
> 
> (Of course, if disks don't support tagged queueing, you'll never have this 
> problem at all, but most disks do these days, and I strongly suspect it 
> really can aggravate latency numbers a lot).
> 
> Jens? Comments? Or do you do that already?

Yes, CFQ tries to handle that quite aggressively already. With the
emergene of NCQ on SATA, it has become a much bigger problem since it's
seen so easily on the desktop. The SCSI people usually don't care about
latency that much, so not many complaints there.

The recently posted patch series for CFQ that I will submit soon for
2.6.22 has more fixes/tweaks for this.


-- 
Jens Axboe


  parent reply	other threads:[~2007-04-30  7:01 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27  7:59 [ext3][kernels >= 2.6.20.7 at least] KDE going comatose when FS is under heavy write load (massive starvation) Mike Galbraith
2007-04-27  8:33 ` Andrew Morton
2007-04-27  9:23   ` Mike Galbraith
2007-04-27 10:17   ` Mike Galbraith
2007-04-27 11:59   ` Marat Buharov
2007-04-27 12:30     ` Peter Zijlstra
2007-04-27 13:50       ` Mark Lord
2007-04-27 12:39     ` Manoj Joseph
2007-04-27 15:30     ` Linus Torvalds
2007-04-27 19:31       ` Andreas Dilger
2007-04-27 19:44         ` Mike Galbraith
2007-04-27 19:50         ` Linus Torvalds
2007-04-27 20:05           ` Hua Zhong
2007-04-27 20:12           ` Miquel van Smoorenburg
2007-04-27 20:12           ` Bill Huey
2007-04-28  5:37             ` Mikulas Patocka
2007-04-28  5:45               ` Mikulas Patocka
2007-04-28 21:57               ` Bill Huey
2007-04-28 22:38                 ` Mikulas Patocka
2007-04-27 20:29           ` Gabriel C
2007-04-27 20:45           ` Stephen Clark
2007-04-27 20:54           ` Manoj Joseph
2007-04-28  8:45           ` Matthias Andree
2007-04-27 22:18         ` Andrew Morton
2007-05-03 17:38           ` Alex Tomas
2007-05-03 23:54             ` Andrew Morton
2007-05-04  6:18               ` Alex Tomas
2007-05-04  6:38                 ` Andrew Morton
2007-05-04  6:57                   ` Alex Tomas
2007-05-04  7:18                     ` Andrew Morton
2007-05-04  7:39                       ` Alex Tomas
2007-05-04  8:02                         ` Andrew Morton
2007-04-28  8:44       ` Matthias Andree
2007-04-28 20:46   ` Mikulas Patocka
2007-04-28 21:12     ` Lee Revell
2007-04-29 20:49       ` Mark Lord
2007-04-29 21:17       ` Mikulas Patocka
2007-04-27 15:18 ` Linus Torvalds
2007-04-27 15:41   ` John Anthony Kazos Jr.
2007-04-27 15:54     ` Linus Torvalds
2007-04-27 16:24       ` Chuck Ebbert
2007-04-27 19:43       ` Marko Macek
2007-04-27 18:31   ` Andrew Morton
2007-04-27 19:09     ` Zan Lynx
2007-04-27 22:07       ` Andrew Morton
2007-04-27 19:27     ` Mike Galbraith
2007-04-28  8:51     ` Matthias Andree
2007-04-28  8:59       ` Andrew Morton
2007-04-28 16:30       ` Linus Torvalds
2007-04-28 16:56         ` Paolo Ornati
2007-04-27 19:28   ` Mike Galbraith
2007-04-27 20:06   ` Jan Engelhardt
2007-04-27 21:22     ` Linus Torvalds
2007-04-28  4:25   ` Mike Galbraith
2007-04-28  6:32     ` Mike Galbraith
2007-04-28  7:01       ` Andrew Morton
2007-04-28  7:12         ` Mike Galbraith
2007-04-28  6:32   ` Mikulas Patocka
2007-04-28 16:05     ` Linus Torvalds
2007-04-28 16:37       ` Ingo Molnar
2007-04-28 17:11         ` Mikulas Patocka
2007-04-30  6:57           ` Jens Axboe
2007-04-28 17:55       ` Mikulas Patocka
2007-04-30  6:56       ` Jens Axboe [this message]
2007-05-02  6:53   ` Jens Axboe
2007-05-02  7:36     ` Mike Galbraith

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=20070430065646.GC21015@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikulas@artax.karlin.mff.cuni.cz \
    --cc=torvalds@linux-foundation.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