# Memory limits using K8S

**URL:** <https://discuss.aerospike.com/t/memory-limits-using-k8s/10859>\
**Category:** Configuration\
**Tags:** docker\
**Created:** [February 29, 2024, 11:00am UTC](https://discuss.aerospike.com/t/memory-limits-using-k8s/10859 "2024-02-29T11:00:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shachar](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Shachar](https://discuss.aerospike.com/u/Shachar)\
**Post date:** [February 29, 2024, 11:00am UTC](https://discuss.aerospike.com/t/memory-limits-using-k8s/10859/1 "2024-02-29T11:00:27Z")

</div>

Hey! 👋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!

---

<div class="post-metadata">

**Author:** ![naresh.maharaj](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/naresh.maharaj/32/1669_2.png) [@naresh.maharaj](https://discuss.aerospike.com/u/naresh.maharaj)\
**Post date:** [March 6, 2024, 12:21pm UTC](https://discuss.aerospike.com/t/memory-limits-using-k8s/10859/2 "2024-03-06T12:21:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ali.ambere](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/ali.ambere/32/2315_2.png) [@Ali.ambere](https://discuss.aerospike.com/u/Ali.ambere)\
**Post date:** [May 29, 2024, 11:46am UTC](https://discuss.aerospike.com/t/memory-limits-using-k8s/10859/4 "2024-05-29T11:46:33Z")

</div>

Hey @naresh.maharaj Thanks for the solution! 🥰

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/system/32/2274_2.png) [@system](https://discuss.aerospike.com/u/system)\
**Post date:** [August 21, 2024, 11:47am UTC](https://discuss.aerospike.com/t/memory-limits-using-k8s/10859/5 "2024-08-21T11:47:05Z")

</div>

This topic was automatically closed 84 days after the last reply. New replies are no longer allowed.
