udev performance

William Cohen wcohen at redhat.com
Tue Sep 11 15:02:45 UTC 2007


Harald Hoyer wrote:
> Harald Hoyer schrieb:
>> 44.1% (1,6s) with /sbin/modprobe
> 
> modprobe is parsing its configuration/dependency files every time it is 
> called.
> 
>> 12% (0.44s) with 60-net.rules
> 
> I am sure 60-net.rules does not have to call 
> /etc/sysconfig/network-scripts/net.hotplug for _every_ "net" event.
> 
> 

A while back I did some experiments with systemtap and found that modprobe was 
doing a linear search through modules.deps:

http://sourceware.org/ml/systemtap/2007-q1/msg00140.html

I wrote a script that would prepend the modules that are actually used to the 
beginning of modules.dep to reduce the average length of search. This reduced 
the amount of data read (and time spent waiting for I/O) and slightly reduced 
the time to boot the machine. Bootchart samples process state periodically. 
Below is some of the data extracted from the bootchart samples:

		        all states	D state
             		modprobe    	modprobe
             		samples 	samples
normal    modules.dep    120        	73
reordered modules.deps    63        	27

Having to linearly through 250K of text in modules.dep each time a module is 
loaded doesn't seem very efficient.


-Will




More information about the fedora-devel-list mailing list