[Bug 369550] [NEW] /etc/init.d/virtualbox-ose wastes 10 seconds with find /lib/modules
Marius Gedminas
marius at pov.lt
Wed Apr 29 21:48:26 UTC 2009
Public bug reported:
Binary package hint: virtualbox-ose
bootchart shows me that /etc/rc2.d/S20virtualbox-ose spends 10 seconds
doing disk I/O in find. I see this in the init script:
if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null
|grep -q vboxdrv; then
failure "No suitable module for running kernel found"
fi
if ! rm -f $DEVICE; then
failure "Cannot remove $DEVICE"
fi
if ! modprobe vboxdrv > /dev/null 2>&1; then
failure "modprobe vboxdrv failed. Please use 'dmesg' to find
out why"
fi
The sole purpose of that costly operation is to print a slightly more
informative error message in case modprobe should fail.
I would suggest using 'modprobe -n -q vboxdrv' instead of find.
Experiments show it takes only 1 second:
$ echo 3 |sudo tee /proc/sys/vm/drop_caches
3
$ time modprobe -n -q vboxdrv
real 0m0.995s
user 0m0.004s
sys 0m0.000s
$ time find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv
real 0m12.979s
user 0m0.036s
sys 0m0.076s
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: virtualbox-ose 2.1.4-dfsg-1ubuntu3
ProcEnviron:
LC_CTYPE=lt_LT.UTF-8
PATH=(custom, user)
LANG=lt_LT.UTF-8
SHELL=/bin/bash
SourcePackage: virtualbox-ose
Uname: Linux 2.6.28-11-generic i686
** Affects: virtualbox-ose (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-bug i386
--
/etc/init.d/virtualbox-ose wastes 10 seconds with find /lib/modules
https://bugs.launchpad.net/bugs/369550
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list