I really wish building minimal, custom kernels was easier. NixOS makes it somewhat sane but it's still a mess of custom kconfig, defconfig target hacking, and manually splicing out the necessary firmware and kernel modules. The kernel doesn't even have an interface to show what firmware blobs have been loaded. You can do some firmware signature enforcement but I guess no one cares about random binary blobs are running just to work your laptop webcam.
It would be very useful if I could just boot a kernel and get an instant report of what kernel config, firmware and modules are actually used/needed. You can kind of do this but
Tangential but TierHive looks to be doing great work. You can get a VPS from them for about a couple of dollars a year.
It's not going to be powerful (128MB of RAM 1GB of storage) but if you run Alpine or NetBSD you can use it as a WireGuard peer, to host a small
Website or to run some cron jobs.
I'm running an [OpenStick](https://github.com/OpenStick/OpenStick) next to my Kubernetes cluster for fun and there's actually a lot of useful software that runs great with a limited amount of ram.
In college I had a laptop with eight megabytes of RAM. It ran Windows 3.11, including a full office suite (Ami Pro, Lotus 123, etc) and web browsers, USENET readers, mIRC, all in 8MB. It also ran an html server and ftp server as background processes. Today it couldn’t even run the RSS reader in that list.
Absolutely. There are many lightweight services that would fit.
The rule of thumb is to look for something written in a native language that doesn't need to process a huge amount of data.
I was running a similar experiment but on bare metal, and my bottleneck was disk not RAM, so trimming the firmware and modules yield the biggest win. And I compile on a different host and just push binaries to the resulting systems.
One thing I was wondering is, whether switching some leaf packages to Musk would help. Rebuilding the whole system for Musl seems broken most of the time, but many leaf packages can still be cross-compiled. So e.g. I'd get a Caddy or OpenBao binaries, etc.
Most of them can be compiled into kernel OR as a module based on your config, some configurations require things to be built in. A lot of the platform stuff is usually compiled in to make booting faster and initramfs easier
This reminded me I wanted to check how small can I make chrome by disabling all the unnecessary features. I'd really like to get something I can swap in the electron packages to reduce the ram usage. Sometimes it's worth fighting for the resources we pay for.
I expected a discussion of NixOS specific issues like different versions of libraries that are loaded at the same time. Instead, this article disucces kernel tweaks and disabling system services, which is not specific to NixOS. So the title is a bit misleading.
I really wish building minimal, custom kernels was easier. NixOS makes it somewhat sane but it's still a mess of custom kconfig, defconfig target hacking, and manually splicing out the necessary firmware and kernel modules. The kernel doesn't even have an interface to show what firmware blobs have been loaded. You can do some firmware signature enforcement but I guess no one cares about random binary blobs are running just to work your laptop webcam.
It would be very useful if I could just boot a kernel and get an instant report of what kernel config, firmware and modules are actually used/needed. You can kind of do this but
Tangential but TierHive looks to be doing great work. You can get a VPS from them for about a couple of dollars a year.
It's not going to be powerful (128MB of RAM 1GB of storage) but if you run Alpine or NetBSD you can use it as a WireGuard peer, to host a small Website or to run some cron jobs.
I'm running an [OpenStick](https://github.com/OpenStick/OpenStick) next to my Kubernetes cluster for fun and there's actually a lot of useful software that runs great with a limited amount of ram.
Some of my favourites are:
[Zeroclaw](https://github.com/zeroclaw-labs/zeroclaw) - 3 MB RSS when idle!
[Beszel](https://github.com/henrygd/beszel) - 10 MB agent + 10 MB server
[Gatus](https://github.com/TwiN/gatus) - 10 MB
[Fusion RSS](https://github.com/0x2E/fusion) - 22 MB
[Adguard Home](https://github.com/AdguardTeam/AdGuardHome/) - 40 MB
[Shiori](https://github.com/go-shiori/shiori) - 10 MB
You won't be able to run all of this on a 128 MB ram VPS but I bet you can run 1-2 services easily!
In college I had a laptop with eight megabytes of RAM. It ran Windows 3.11, including a full office suite (Ami Pro, Lotus 123, etc) and web browsers, USENET readers, mIRC, all in 8MB. It also ran an html server and ftp server as background processes. Today it couldn’t even run the RSS reader in that list.
Pointers were smaller back then.
Absolutely. There are many lightweight services that would fit. The rule of thumb is to look for something written in a native language that doesn't need to process a huge amount of data.
I was running a similar experiment but on bare metal, and my bottleneck was disk not RAM, so trimming the firmware and modules yield the biggest win. And I compile on a different host and just push binaries to the resulting systems.
One thing I was wondering is, whether switching some leaf packages to Musk would help. Rebuilding the whole system for Musl seems broken most of the time, but many leaf packages can still be cross-compiled. So e.g. I'd get a Caddy or OpenBao binaries, etc.
> Blacklisted the hardware a KVM guest never has or doesn't need
I'm a little surprised that matters; shouldn't Linux be lazy loading drivers only when it sees hardware?
Most of them can be compiled into kernel OR as a module based on your config, some configurations require things to be built in. A lot of the platform stuff is usually compiled in to make booting faster and initramfs easier
I wonder. You can nest KVM. Maybe that's why the modules are loaded?
This reminded me I wanted to check how small can I make chrome by disabling all the unnecessary features. I'd really like to get something I can swap in the electron packages to reduce the ram usage. Sometimes it's worth fighting for the resources we pay for.
This isn't always an option because system webviews differ, but have you considered Tauri?
I expected a discussion of NixOS specific issues like different versions of libraries that are loaded at the same time. Instead, this article disucces kernel tweaks and disabling system services, which is not specific to NixOS. So the title is a bit misleading.
I thought the same.
[flagged]