next up previous
Next: Libraries Up: Reduce run time sizes Previous: multi-call binaries

The Busybox vs. Standard Tools

First, let us look at the file size of the busybox (0.28) when compared to the sum of the sizes of the corresponding standard Linux tools. The busybox occupies 65KB, whereas the sum of the Linux tools occupies 608KB. Even the stripped Linux tools still require 592KB (egcs-2.91.66, glibc 2.0.7).

This comparison might not seem fair, since many options available in the standard tools are not available in the busybox, but the essence is that you can pack lots of functionality into a tiny executable, if reduced to the minimum needs of administration. The real challenge is deciding precisely what is needed and what can be removed. With all the dependencies within an OS like Linux (and the use of shell-scripts for many jobs), this is not easily decided. This leads us back to one of the motivations for such a minimum system: reduced system complexity, which eases understanding of such dependencies.

The second comparison is the hello world program in C compiled with gcc (egcs-2.91.66) as an ELF-executable and the size difference of a hello world function added to busybox called via a link named hello. The ELF-executable comes in at 33KB raw and 7KB stripped. The increase in size of the busybox, however, is a nominal 161 bytes.

This shows how efficiently the overhead reduction is achieved by having one main routine and calling everything else as a function, via the name of which busybox is called.


next up previous
Next: Libraries Up: Reduce run time sizes Previous: multi-call binaries
Der Herr Hofrat
2002-03-08