41
submitted 1 year ago by aesir@lemmy.world to c/linux@lemmy.ml

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?

you are viewing a single comment's thread
view the rest of the comments
[-] henrikx@lemmy.dbzer0.com 5 points 1 year ago

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.

[-] aesir@lemmy.world 4 points 1 year ago

The server is clearly overloaded, as soon as I start using some 10% of CPU frequently for some minutes (due to swap operations), the Hypervisor starts to throttle my instance and this of course makes the thing worse with an avalanche effect. When this happens steal time displayed from top can go literally as high as 90%.

[-] bruce965@lemmy.ml 5 points 1 year ago* (last edited 1 year ago)

On AWS they have something called "bursting". Basically they will let you use 100% of your vCPU, but not all the time. If you use it constantly they start to throttle you. That's explicitly stated when you rent an EC2 instance (which is their VPS). Perhaps your provider is doing something similar.

[-] aesir@lemmy.world 2 points 1 year ago

Yes exactly, burstable instances it's common jargon for AWS and GCP, but applies to all major providers.

[-] falsem@kbin.social 1 points 1 year ago

Yeah, those are great for something that will be sitting idle most of the time, awful for anything else.

[-] Lojcs@lemm.ee 2 points 1 year ago

Ask the provider not to throttle you then? Are you not entitled to the entire cpu?

[-] nous@programming.dev 4 points 1 year ago

I use only free VPSs

So probably not entitled to anything from them.

[-] aesir@lemmy.world 2 points 1 year ago

I believe it's a shared VCPU intentionally, I will recheck the terms and conditions, but I think I am not in the position to claim much.

this post was submitted on 01 Oct 2023
41 points (97.7% liked)

Linux

47984 readers
1992 users here now

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

Related Communities

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

founded 5 years ago
MODERATORS