I've noticed that my nodes with 16GB of RAM only show about 12GB available, and it seems like I'm losing 4GB due to memory being reserved for system processes. I'm using Azure Kubernetes Service (AKS), and I'm curious if this is typical. If I were to use a smaller node, like one with 4GB of RAM, wouldn't the reserved memory be proportionally less? It feels excessive to reserve 4GB. Is it advisable to reduce the reserved memory down to 1GB so I can have 15GB free for my applications?
5 Answers
The operating system is definitely using some resources, and switching to a lightweight OS like Talos could help. It's specifically designed for Kubernetes workload, which might free up some additional memory for you.
Without specific details about your OS and the kubelet's memory requirements, we're all just making guesses about how much memory is really necessary. It'd be helpful to look into those metrics before making any adjustments.
4GB seems a bit high for system processes, but it really hinges on what else you're running on those nodes besides Kubernetes. In most cases, 1GB should suffice for a basic server. Just be sure to monitor performance before making changes in a production environment. Here's a link that might help: [Kubernetes Resource Reservation](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/).
You can set the reserved memory to whatever you want, but keep in mind that if you're using a managed service like AKS, there might be limits on what you can change. Just be cautious with adjustments.
It's not just Kubernetes that's taking up your memory; the operating system also needs some of it for its own processes. So, the memory loss isn't solely due to Kubernetes' configuration. You should be aware that a smaller node will still require some memory for the system, just less than a 16GB node would.
I get that, but with a 4GB node, the OS wouldn't consume all of it like it does with larger nodes. That's why it seems like there's too much being reserved and too much memory left wasted.

Is there a way I can check how much of that reserved 4GB system memory is being used right now?