I spend a lot of time poking around after lightweight applications and even more time trimming down custom kernels, so I suppose it makes sense that I should be seeking out other core utilities to make this machine more usable.
Since it was the python memory script that started this little adventure, here’s what it looks like with dash and mingetty running in Crux.
Private + Shared = RAM used Program 0.0 KiB + 10.0 KiB = 10.0 KiB dhcpcd 0.0 KiB + 11.0 KiB = 11.0 KiB startx 0.0 KiB + 11.0 KiB = 11.0 KiB mingetty 0.0 KiB + 12.0 KiB = 12.0 KiB udevd 0.0 KiB + 17.5 KiB = 17.5 KiB xinit 0.0 KiB + 27.5 KiB = 27.5 KiB vim 0.0 KiB + 30.0 KiB = 30.0 KiB hnb 40.0 KiB + 11.5 KiB = 51.5 KiB init 0.0 KiB + 57.5 KiB = 57.5 KiB musca 0.0 KiB + 63.0 KiB = 63.0 KiB mc 112.0 KiB + 94.0 KiB = 206.0 KiB centerim 124.0 KiB + 90.0 KiB = 214.0 KiB dash (5) 288.0 KiB + 69.5 KiB = 357.5 KiB htop 328.0 KiB + 48.0 KiB = 376.0 KiB alpine 516.0 KiB + 133.0 KiB = 649.0 KiB calcurse 1.0 MiB + 68.0 KiB = 1.1 MiB Xorg 1.0 MiB + 109.0 KiB = 1.1 MiB urxvtd --------------------------------- 4.3 MiB ================================= Private + Shared = RAM used Program
Gasp! Xorg is taking up 1.1MiB this time! I must be doing somthing wrong. …
mingetty, if you compare it with agetty from last time, is only a teeny improvement in terms of memory footprint. Eleven kilobytes versus 11.5 is nothing to crow about. On the other hand, it was fairly easy to put into place, with only an adjustment to the /etc/inittab file to trigger it instead of agetty.
And since it technically evaporates when the user logs in, I suppose it’s not really getting in the way. On the plus side, it seems a little quicker on the draw; I can’t measure or quantify that though, so I probably shouldn’t even say it.
dash, however, is both a blessing and a curse. As you can see above, it’s considerably smaller than bash, with about 43KiB per instance (roughly calculated) against 185KiB for bash. On a machine with only 16MiB to spare, that’s a considerable sum. And all the more important when 99 percent of the applications are terminal based.
On the other hand, dash is somehow … eccentric, to pick a word that doesn’t sound too loaded. It’s easy enough to install, and I selected it as a shell of choice for both root and the user accounts by way of the
usermod -s /bin/dash command. Maybe that was overkill, but it worked right. (I also edited a few scripts to pick dash over bash, just because.)
But there is one feature that I am used to in bash that catches me every time in dash — autocompletion. I smack the tab key as a matter of course almost any time I move a file or start a script, and dash can’t do that (I don’t think😕 ).
So I find that a little grating. dash also has trouble interpreting escape characters and some of the PS1 codes that bash uses, which means my terminal prompt became a messy string. And there’s no history, which is kind of a good thing to me.
Most of all, I found I couldn’t use dash alone, with bash uninstalled. I kept my path variables in place and removed bash, but dash claimed it couldn’t find anything — startx, certain commands, and so forth — even when the prompt was sitting in the same directory. Replacing bash corrected that problem; perhaps there was another way.
I am still only into the first day or so of using either dash or mingetty, and these things take time to figure out. I’ll probably keep them around so long as they don’t become encumbrances or prove somehow less functional.
After all, saving only half of a kilobyte on one, while suffering without autocompletion plus the need to keep around bash on the other … might not warrant keeping them around.😐