-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not really 64-bit related, but this utility turned out to be so useful
for me that I figured I'd pass it on.  Especially since many of us
64-bitters are running twice as many emerges to maintain our chroots...

The more recent kernels have a number of IO-scheduling options.  I'm
using CFQ as my default (kernel option - but if you have support built
you can switch it by writing to a file in /sys on a per-drive basis).  A
few of the schedulers support ionice (emerge schedutils-1.5.0).  This is
the equivalent of process niceness, but for IO instead of CPU.  On my
system IO tends to be the more limiting resource, and since I run mythtv
I need to be careful not to block recordings with huge emerge runs.

When using the command "ionice -c 3 nice -n 20 update-world -i" the
emerge runs at fairly close to full speed, but the system is completely
responsive (even with emerges running in two chroots at the same time).
 Note that I'm using tmpfs for /var/tmp so you might get a much slower
merge if every file has to be written to disk.

One caution - be careful about running updatedb, prelink, backups, etc
in cron jobs using ionice.  I'd avoid scheduling these tasks as
idle-class, as they can take a VERY long time to run.  I'd set them as
best-effort, but with a high niceness level (-n 7).  I'm not 100% sure,
but I think the logic is that processes in different classes (realtime,
best-effort, idle) don't compete AT ALL for resources - so if like me
you have some commercial flagging jobs or a slow stream of recorded data
going to disk the drive won't batch up data and do large flushes, but
instead will just write a trickle of data while your idle-class job sits
around for hours.  It doesn't seem to impact emerge since the writes are
going to tmpfs - which may never get written to disk (and when they do
it is via swap which probably uses a different algorithm).

If anybody else has problems with disk contention you should definitely
check out ionice.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF8//YG4/rWKZmVWkRArteAKCNJ0+9m25jZ94pNXPsWHo+bKWscQCgwg99
575x694YQFc6q0Hyu/V8jR0=
=P1S/
-----END PGP SIGNATURE-----

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to