udev performance

Harald Hoyer harald at redhat.com
Tue Sep 11 15:40:27 UTC 2007


William Cohen schrieb:
> 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
> 

Problem is, that most of the modprobes with a modalias are not existent and so every line is parsed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3623 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20070911/da69c914/attachment.bin>


More information about the fedora-devel-list mailing list