Re: Poor desktop responsiveness with background I/O-operations

From: Mike Galbraith
Date: Mon Sep 21 2009 - 00:24:11 EST


On Sun, 2009-09-20 at 17:22 -0700, Justin P. Mattock wrote:
> Wow, at first I did not notice anything
> from your *.sh script, but then a few moments
> later, the system became vary sluggish. firefox
> takes about 15 seconds to load. OS is mint linux
> with the latest HEAD on an imac9,1.

CFQ inherits IO priority from the parent on fork(), so nicing a shell or
the dd should (and does) help a LOT. It also inherits the CPU scheduler
class. I just checked, and IO does indeed inherit SCHED_IDLE as well as
the RT classes (SCHED_BATCH does nothing). Setting the dd to SCHED_IDLE
makes a big difference, as it should, so there's a bigger hammer than
nice + ionice. SCHED_IDLE is CPU_adorable + IO_nicest.

Anyway, the problem seems to have to have at least two facets:
1. streaming IO causing pagecache reclaim. That problem doesn't seem
to want to go away. Fixing that won't help 2 one bit though.

2. reads are sync, more heavily affected by seek latency than writes.
If the disk your binaries live on is seeking a lot, you pay a LOT.

Hohum, IO + VM = haaaaard ;-)

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/