Tuesday, September 11, 2007

ionice - redux

I love ionice enough to give it thre exclamation points but I'd been having some problems with it. Mainly, I was optimizing too much. I was using -c 3 on the assumption that everything would run much better if svn update or git-svn rebase was taking too much IO bandwidth.

This was a mistake. I would have problems when the ionice -c 3 process was running since -c 3 (idle priority) requires root access, so if it created files, those files would be owned by root since ionice -c 3 needs to be run under sudo or directly, as root (sudo su, root login or /etc/crontab).

It took me more than a month of frustration (and actually stopping the use of ionice, or doing a chown -R at the end) to finally ask google :-). I must not have been all *that* frustrated.

There's an explanation here of why ionice -c 3 requires root access.

So finally I'm convinced and will now run large svn updates (or my huge rdiff-backup based backup system to a slow external USB drive that only runs at USB 1.0 speeds) under ionice -c 2 -n 7. A few quick tests shows that performance of the laptop (no locking of X, etc) is about as good as with -c 3 but there's no need to run under sudo, so no problems with file ownership or permissions later.

No comments: