List Info

Thread: Use of ionice




Use of ionice
country flaguser name
United States
2007-03-11 08:10:48
-----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+bKWscQCg
wg99
575x694YQFc6q0Hyu/V8jR0=
=P1S/
-----END PGP SIGNATURE-----
Re: Use of ionice
country flaguser name
United States
2007-03-11 08:53:13
SPEAKING OF IONICE, DID ANYONE NOTICE THE SCHEDUTILS PACKGE
DOESN'T SEEM TO 
INSTALL A MANPAGE FOR IT?  I HAVE TOO GOOGLE FOR THE MAN
PAGE ANY TIME I 
FORGET THE COMMAND-LINE ARGUMENTS.

-- 
BOYD STEPHEN SMITH JR.                     ,= ,-_-. =. 
BSS03VOLUMEHOST.NET                      ((_/)O O(_))
ICQ: 514984 YM/AIM: DATWINKDADDY           `-'(. .)`-' 
HTTP://IGUANASUICIDE.ORG/                      _/     
NEW GPG KEY!  OLD KEY EXPIRES 2007-03-25.  UPGRADE NOW!
Re: Use of ionice
country flaguser name
United States
2007-03-11 11:55:23
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Boyd Stephen Smith Jr. wrote:
> Speaking of ionice, did anyone notice the schedutils
packge doesn't seem to 
> install a manpage for it?  I have too google for the
man page any time I 
> forget the command-line arguments.
> 

I did in fact notice that, and it is very annoying...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFF9DR7G4/rWKZmVWkRAtpZAKCLz5Y3vDkUdc6S/CZrqfMZ6qp58wCf
cxDW
MNS1NCwmK/k3nJLEcQjtnx4=
=68hB
-----END PGP SIGNATURE-----
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )