update-notifier and friends (almsot dpkg) should be configurable to be ionice class 3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update notifier |
New
|
Undecided
|
Unassigned |
Bug Description
Purpose:
update-notifier and friends and sons (apt-check, apt-get, dpkg...) should be "ionice" class 3. (with linux kernel >= 2.6.13 CFQ)
Why:
apt-check and dpkg use the hard drive far a lot. On a small configurations, this even hangs the system (server environment or desktop usage) for several minutes, due to disk access. Setting a nice value to 19 (as does already apt-check) seems not the right choice since disk i/o is not affected by this value.
Suggestion:
I suggest update-notifier and friends to be set to ionice class 3 (idle) so that they won't hang the system while running on small hardware configurations.
How:
dpkg and apt-get does not have "nice" nor "ionice" preferences. So, one work around by wraping them with a one-line shell-script diversion using nice and ionice. For example, on dpkg, this way does the trick:
$ sudo dpkg-divert --divert /usr/bin/dpkg.real --rename /usr/bin/dpkg
$ sudo vi /usr/bin/dpkg
#!/bin/sh
nice -19 ionice -c 3 /usr/bin/dpkg.real $@
$