libvirtd polling /etc/modprobe.d every second
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu Power Consumption Project |
New
|
Undecided
|
Unassigned | ||
libvirt |
Confirmed
|
Medium
|
Unassigned | ||
virt-manager |
Confirmed
|
Medium
|
Unassigned | ||
libvirt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
libvirtd is polling /etc/modprobe.d every second with opendir() .. closedir() calls:
fatrace reports:
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): CO /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): O /etc/modprobe.d
libvirtd(1405): C /etc/modprobe.d
libvirtd(1405): CO /etc/modprobe.d
debugging this a bit deeper:
Breakpoint 6, __opendir (name=0x7f668f1
158 ../sysdeps/
(gdb) where
#0 __opendir (name=0x7f668f1
#1 0x00007f6694c1a75c in glob_in_dir (pattern=
directory=
errfunc=
at ../posix/
#2 0x00007f6694c1bf1c in __GI_glob (pattern=
flags=
at ../posix/
#3 0x00007f6694c1b4b5 in __GI_glob (pattern=
flags=
#4 0x00007f6687af1328 in ?? () from /usr/lib/
#5 0x00007f6687af2fc0 in ?? () from /usr/lib/
#6 0x00007f6687ac6e7e in aug_load () from /usr/lib/
#7 0x00007f6687d27af0 in ?? () from /usr/lib/
#8 0x00007f6687d281ce in ?? () from /usr/lib/
#9 0x00007f6687d29dd7 in ?? () from /usr/lib/
#10 0x00007f6687f3889c in ?? () from /usr/lib/
#11 0x00007f669525de6c in virConnectNumOf
#12 0x0000000000421ad7 in ?? ()
#13 0x00007f66952b4a62 in virNetServerPro
#14 0x00007f66952aecd8 in ?? () from /usr/lib/
#15 0x00007f66951c852e in ?? () from /usr/lib/
#16 0x00007f66951c7be6 in ?? () from /usr/lib/
#17 0x00007f6694f26f8e in start_thread (arg=0x7f668f1b
#18 0x00007f6694c50e1d in clone () at ../sysdeps/
so it appears be be kicked off from virConnectNumOf
ret = conn->interface
This seems to me to be unneccessary polling and directory read overhead.
Thanks for reporting this bug. Did you by any chance have virt-manager connected to that libvirtd instance while you were taking these measurements?
It's not obvious where libvirt itself is calling this (outside of the remote driver) so I'm wondering whether virt-manager may actually be asking for these results every second.