Memory limits using K8S

Hey! :wave: I am using aerospike on kubernetes and was wondering how much memory I should allocate compared to the pod limit. For example I set the pod request and limit to 128Gi, then in aerospike how much memory should I set the namespace to? 126? How much do I need to leave for the pod function properly? Basically I want to know what should the difference be between aerospikeNamespaceMemoryGB and resources.limits.memory. My data is entirely in memory and not on disk by the way. Thank you!

Hello,

Ideally 80% is a good starting point i.e. resources.limits.memory x 0.8 as aerospikeNamespaceMemoryGB.

However it’s quite possible with monitoring and checking the pod status you might be able to go to 90% but I wouldn’t try to over optimise this. The kubelet reports resource usage so you can see this in the pod status to get some idea. If you get a OOM then the pod will simply go into a restart.

cAdvisor is a good open source tool for checking detailed resources used by a container.

Kind regards Naresh Maharaj Aerospike

1 Like