Vertically stacked thanks to the use of #GNUScreen on my host system, three #Linux setups running simultaneously, competing for lightweightness. (The software you see running inside all of them is the htop
)
All systems are headless, and two of them are really, really headless, meaning no video adapter and limited to interfacing through serial port ttyS0
(although I could also use SSH, but I chose not to).
The bottom-most system is #ArchLinux (btw), a distro I've been long familiar with. It's set up with #VirtualBox VMSVGA Graphics adapter, so it's not exactly headless.
The middle one is #AlpineLinux, a distro often used for Docker containers. It really has no Graphics adapter and, still, it managed to boot gracefully. I'm interfacing with it through its ttyS0
, and I can even see the Plymouth Boot Screen through the serial port (because I configured GRUB to use serial along with console).
The top-most system is #VoidLinux, a distro whose ISO can't be booted with less than 2GB of RAM (and trust me, I tried, and I faced a Kernel Panic every time I tried to reduce RAM for its Live ISO). I managed to install it with a setting that allows for way less RAM. Similarly to Alpine, it also has no Graphics adapter and no SSH daemon, so I'm interfacing with it through serial.
All the three systems have 256 MB of "physical" (VM) RAM, but the total memory (MemTotal) is less due to certain memory reservations. Alpine and Arch both have 203MB of MemTotal (53MB less than the physical due to kernel and other things stealing from total memory), while Void has 197MB of MemTotal (its kernel code, kernel bss, kernel data and kernel rodata sums up to 5MB additionally needed mem reservation, and SATA controller is using a little more mem reservation than PIIX4).
Void's root fs is using 2.1GB from a 7.3GB partition (within a 8GB virtual disk).
Alpine's root fs is using 213MB from a 3GB partition (within a 4GB virtual disk).
Arch's root fs is using 4.6GB (to be fair, there are some media files there) from a 13.2GB partition (within a 16GB disk)
As you can see, Arch is heavy to this task. Don't take me wrong: Arch is an excellent distro. It's either good for desktop (be it bare-metal or virtualized), for gaming and for bare-metal servers. But when it comes for a headless server, it got too much weight to carry from its own, as you can see by its memory usage. systemd-journald
alone is using 8.7% of mem, while NetworkManager is using 9.3%. For comparison, Alpine's syslogd
, also responsible for daemon logging, is using just 0.4%.
It's just a casual test. My purpose is to find the lightweightest VM with "routing" capabilities: there's a fourth VM (an Arch with LXQT desktop) which needs to be isolated from my host's LAN (i.e., no routing to my own host, and no routing to the other devices within my LAN) while being able to access the Internet (and that's why I'm not willing to have a SSH daemon, although I did set up such service within the Arch VM). The aforementioned Arch VM is currently the one doing this job, configured with iptables
, although the screenshot was taken in a scenario where I didn't boot the fourth VM, just the trio Void, Alpine and headless Arch.
It's interesting to see a system gracefully booting without any screen, yet getting to offer 256-color terminal through serial interface.