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?

30 points
*

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

permalink
report
reply
11 points
*

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.

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
3 points

Nice! Love to learn new options.

permalink
report
parent
reply

I’m going to chime in and recommend Racknerd. Inexpensive and rock solid for me.

permalink
report
parent
reply
1 point

As long as you’re not running Plex lol

permalink
report
parent
reply
0 points

I use Vultr and OVH.

permalink
report
parent
reply
1 point

I’ve heard good things about OVH.

permalink
report
parent
reply
18 points
*

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.

permalink
report
reply
4 points

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.

permalink
report
parent
reply

Yeah good luck getting one. I tried for a month before giving up.

permalink
report
parent
reply
12 points

Turn on swap! That way more of your actual ram can be used by the application. Yes, it will probably be slow as crud but it should use more memory than it has. If swap is already on… sorry

permalink
report
reply
4 points

I forgot to mention, I had plenty of swap available, now I disabled swap to force zram usage. I still need to see what happens running with both, it’s hard when each trial takes 12-24 hours to show its result.

permalink
report
parent
reply
5 points

Oh yikes yeah I would not be good at that pace 😅 I know you can rebuild the kernel with less features to reduce ram usage, but other than that I would be looking at what you’re already doing.

Have you considered removing docker from the equation and running directly on the host os?

permalink
report
parent
reply
3 points

Running without docker is out of question, is a bundle of 6 docker containers. Deployment and management without it would be too complicated. Luckily somebody in another reply made me realize that the RAM eating container (cockroach DB) is far less essential than I thought and I can look for a replacement.

permalink
report
parent
reply
9 points

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.

permalink
report
reply
2 points

Yes, this is a possible fallback plan.

permalink
report
parent
reply
6 points

Get an oracle cloud account and use their free arm server. You’ll have 24 gb of ram to play with. For free.

permalink
report
reply
2 points

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.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments