[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash is a monstor (was: ITP: lukemftp)

On Mon, Nov 08, 1999 at 04:40:04PM +0000, Jules Bean wrote:
> On Mon, 8 Nov 1999, Edward Betts wrote:
> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > 
> > Bash is a monster, each copy uses about 1Mb of memory. I have already set all
> > my gettys to mingetty, which saves some RAM. I would like to move to using a
> > smaller shell like ash. I understand what you are saying about a small ash for
> > scripts on boot disks and the like. I could suggest two ash packages, but it
> > is probably a bit OTT.
> FUD.
> Sigh.
> On most typical applications/systems, there are several instances of a
> given shell running. In this case almost all of the memory is shared
> between them, and so takes up no more space than one copy.
> So the gain of bash over ash in this department is minimal.

I just measured it (with memstat, I know this is not twice reliable...).
bash takes 176 KB each copy + about 550 KB shared + 230 KB ncurses (
+880 KB glibc, but this cannot be avoided)

ash takes 44 KB each copy + 88 KB shared (+880 KB glibc)

It _does_ make a difference, but it is noticeable only on small memory 
systems (you save ~830 KB for first shell, + ~132 for each copy)
a friend of mine has 4 MB RAM and changing bash to ash means the change from
unusable to "it is possible to log in, even more times, and run ssh"

| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__         garabik @ fmph.uniba.sk           |
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!

Reply to: