Hi,
Do you have suggestions for kernel tweaks for getting the most out of a RAM limited system?
I am running a service requiring 2GB of RAM (netbird) on a VPS which has just 1 GB of memory. I am doing so because I am a stingy bastard and I use only free VPSs for my personal use so I get what I am paying for.
Because of this hardware limit in about 12 hours from service start I begin swapping a bit too much. This would still be manageable but soon the hypervisor gets really pissed and steals up to 90% of the CPU. So the only solution so far is restarting the docker containers every 12 hours (not great, not terrible).
Looking to improve this, Iam now experimenting with ZRAM and swappiness and it seems some benefit can be achieved by using some of the Linux kernel feaures. Is there anything else I should look into?
Wow you’re right. You are a stingy bastard.
Never run anything on a free tier if you want to keep it. My legit Oracle account got flagged and deleted for no reason so they’re dead to me, and I’ll tell anyone who will listen. They’re thieving assholes and will snatch away free tier the moment it’s convenient for them.
Do you really need netbird? What for?
Spend some money, consider it the cost of education
To tag onto this… for a low end VPS I love Hetzner. No, they aren’t the cheapest, but the cheaper options are generally bottom-of-the-barrel unstable garbage or require promotions that expire. Hetzner is stable, professional, and cheap. Great choice for a simple personal VPS.
Netcup is cheaper (as far as I know) and really reliable too. Also based in Germany. I use one of their VPS to host my stuff.
Nice! Love to learn new options.
Can really recommend them. They guarantee the lowest price for VPSs and are very reliable. My company (more than 250 people) uses them to host some stuff too.
I’ve only had good experiences. Very reliable.
I’m going to chime in and recommend Racknerd. Inexpensive and rock solid for me.
As long as you’re not running Plex lol
I use Vultr and OVH.
I’ve heard good things about OVH.
If you’re using Oracle cloud (just guessing based off 1GB), they also offer free ARM VMs with 24GB of RAM, and netbird looks to support ARM.
Yes, this is a possibility. the ARM VPS is already running something else, but if I manage to run netbird behind a reverse proxy I can also move it there. BTW there are also 1 GB free VPS on azure (for students) and Google Cloud, but you guessed right.
Yeah good luck getting one. I tried for a month before giving up.
Oracle free tier is 24GB of RAM. I hate Oracle as much as the next person, but worst thing they do is shut it off and you have to migrate.
Get an oracle cloud account and use their free arm server. You’ll have 24 gb of ram to play with. For free.
Thanks for the suggestion, but my 24 GB are well employed already. I wanted at least to outsource the VPN manager to a smaller VPS.
why use docker here? you’re just adding layers of abstraction in an environment that can’t seem to really support them.
that said, switching to 32bit linux, if the VPS supports it, will save you memory.
If the Docker image was built even remotely competently, the overhead of Docker would be minimal. As long as the application doesn’t do something stupid like start systemd inside the container, we’re talking kilobytes to a few megabytes of extra process tracking.
Switching to 32 bit is intriguing, but I imagine many applications (like the one currently running in Docker) won’t be binary compatible. You’d need to compile all your external software which is a pain.
I use Docker on a VPS with 512MB of RAM
🙂💄🎨🤡
Zram (compression), uksmd (deduplication) and swap.
For a different project, but in my blog I document how to set those up: https://moonpiedumplings.github.io/projects/setting-up-kasm/
Try using zram? You could probably get around 5gb of ram if you compress it. https://wiki.archlinux.org/title/Zram
I am experimenting with ZRAM, it is indeed better than ZSWAP, that’s why i am asking if any other kernel features can help.
zram or a cloud instance with more ram https://paul.totterman.name/posts/free-clouds/
It seems to me you are already looking into all the possible options besides getting a VPS with more RAM. I am a bit confused on why you are seeing increased CPU usage by the hypervisor for this though.
What are you trying to do? I read “hypervisor” and am not sure if you mean the one managing your VPS or if you installed one in your VPS.
The one managing my VPS, controlled solely by Oracle corporation