Significant performance problem with modprobe

walter harms wharms at bfs.de
Mon Jun 13 09:03:09 UTC 2011



Am 13.06.2011 09:47, schrieb Ed W:
> 
> 
>>> Obviously fixing iptables is desirable, but is it possible to improve performance 
>>> of busybox modprobe?  Looking at strace the big difference seems to be the 
>>> read of the various files, busybox apparently using lots of getc()?
>>>
>>> Any thoughts on a solution?
>>
>>
>> Apparently upstream tools now use some sort of binary indexed files
>> which allow search to be sped up:
> 
> Hi, thanks for not forgetting about this.
> 
> 
> 
>> There is no fast fix for this: we will need to implement indexed binary files
>> to match upstream speed.
> 
> Hmm, interesting.  My first estimate was that the per character reading
> of the file was slow and hammering me here?  I am on linux and noticed
> that there was a (commented out) chunk of code in busybox to use
> platform line reads, but I have not experimented with whether that
> offers a performance difference
> 
> I'm running from an SLC CF card, so if my modules.alias is 137KB and
> takes around 0.05s to read, then this is very roughly 2.7MB/s, which
> seems a touch on the slow side.  Using "dd" I get approximately 11.3MB/s
> from the raw device, but this isn't including the overhead of my
> filesystem (squashfs+aufs).
> 
> Additionally I'm running the modprobe test many times in a row and I
> might expect the block cache to eliminate the disk read time on
> subsequent runs?
> 
> Therefore low couple of MB/s seems rather a poor read speed for busybox
> processing modules.dep from cache?  I still wonder if the single
> character read is the bottleneck here? (I notice it's also used in sed,
> I could perhaps benchmark that for comparison...)
> 
> Thanks for your thoughts
> 
> Ed W

hi Ed,
just a remark, BB is intended for embedded systems. Normaly they change
not much that means you can compile the drivers static into your kernel
removing the need for modules at all.

This does not touch the subject of perfermance directly but is an indicator
that theses tools are not used much or that nobody cares in this case.

please do not get me wrong it is totaly ok that you have reported that issue
but my impression is that you can improve your system much more easy by other
measures that adding a binary file for modprobe config.

re,
 wh




More information about the busybox mailing list