Gentoo Archives: gentoo-user

From: App Deb <appdebgr@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Best way to improve interactivity with heavy disk activity?
Date: Sat, 27 Nov 2010 21:59:57
Message-Id: AANLkTi=deUD2DxKK7FU6LQyjGG5+cEkdiCDiBb=sqS7M@mail.gmail.com
In Reply to: [gentoo-user] Best way to improve interactivity with heavy disk activity? by Stroller
1 On Fri, Nov 26, 2010 at 5:57 PM, Stroller
2 <stroller@××××××××××××××××××.uk> wrote:
3 > Hi there,
4 >
5 > As per subject, what's the best way to improve interactivity with heavy disk activity, please?
6 >
7 > Or perhaps a better question would be: what approaches are available?
8 >
9 > Presently my main Linux system is basically just a storage server with a *really slow* disk controller. I do all my web-browsing and email (and most other things) on my Mac laptop (because my Mac desktop has recently died ☹), but I occasionally do some bash or perl scripting, searches and other stuff on this Linux box.
10 >
11 > Normally this isn't a problem - the machine is an old Pentium 4 but plenty powerful enough for this simple command-line stuff. However I have recently bought a new STB which plays DVD .iso files across the network, so I started ripping DVDs on storage server, using dvdbackup && mkisofs. When I do so, interactivity becomes *dire* - it takes maybe 15 seconds for *any* command to execute.
12 >
13 > My immediate reaction was to consider the recent "200-line patch to kernel => superkernel" thread:
14 > http://www.gossamer-threads.com/lists/gentoo/user/221770
15 >
16 > But I have also heard of `ionice` in the past: http://linux.die.net/man/1/ionice
17 >
18 > I've never used that - in fact, I can't recall ever having to use the regular `nice` - but I think maybe I should consider it.
19 >
20 > Does anyone have any thoughts, please?
21 >
22 > Stroller.
23 >
24 >
25
26 The "nice" and "ionice" or the cpu "cgroups" are not going to help a
27 lot. The problems of bad interactivity are rarely CPU related so the
28 200line patch is probably going to do nothing to help. Also "ionice"
29 rarely solves these problems, because the problem is not actually on
30 the i/o scheduler but in the page cache management of the kernel,
31 which reacts pretty bad (awful) under pressure.
32
33 As far as I know there is nothing you can do to fix interactivity
34 under these loads, except:
35
36 1. From getting an SSD, that doesn't actually need page cache :)
37
38 2. Fix the page-management/LRU kernel code yourself :)
39
40 Maybe unofficial kernels (ck,zen) have improved page cache management
41 (I haven't tried them), but the issue still remains unfixed in the
42 upstream kernel.