On 11/26/2010 05:57 PM, Stroller wrote:
Hi there,

As per subject, what's the best way to improve interactivity with
heavy disk activity, please?

Or perhaps a better question would be: what approaches are
available?
[...]

But I have also heard of `ionice` in the past:
http://linux.die.net/man/1/ionice

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.

'nice' is for CPU time. 'ionice' is for disk I/O time. So yes, it helps a lot with heavy disk tasks if you run them -c3. This is why Portage has support for ionice (PORTAGE_IONICE_COMMAND). There's also 'schedtool' (sys-process/schedtool).

The way I solved the I/O problems is to use the sys-kernel/ck-sources kernel (2.6.36-r3). It shouldn't be necessary to use ionice and schedtool for most tasks, but I use it for portage with this in make.conf:

PORTAGE_NICENESS=19
PORTAGE_IONICE_COMMAND="sh -c \"schedtool -D \${PID}; ionice -c 3 -p \${PID}\""

But you can use this method for everything you want. Running something with nice -19, ionice -c3 and schedtool -D should make it pretty much invisible; it should have zero impact on interactivity. At least that's the case here when using sys-kernel/ck-sources.


Reply via email to