Busybox & memory

Denis Vlasenko vda.linux at googlemail.com
Thu Jun 21 21:08:56 UTC 2007


On Thursday 21 June 2007 19:55, Martinb_ARM_NOMMU_KISSDVD wrote:
> I can only tell about my personal experience (as a user)
> 
> if I compile 1 busybox with telnetd,crond,httpd,lash,hush,free and I will
> type free I will get less mem then if I create  separated
> httpd,lash,telnetd,inetd etc etc
> the difference is so big that i split (almost) all the busybox applets in
> small parts
> so if mem is really important (and since I only have 4MB free it is) I
> advise to split them

One reason may be that we used to use a lot of static buffers.
This has zero impact on MMU machines, but is rather bad for NOMMU.

This has been improved in latest versions, and can be improved even more, but
it needs to be done in uclibc also.

Another thing which needs improving is stack usage:

# Busybox is a stack-fatty so make sure we increase default size
# (TODO: use "make stksizes" to find & fix big stack users)
FLTFLAGS += -s 20000

20k of stack for each busybox instance isn't terribly good.

Of course, if your particular NOMMU arch cannot share text/rodata section
of several instances of running executables, then you have to split
busybox to avoid having duplicate code loaded.
--
vda



More information about the busybox mailing list