R
RunPod5d ago
vlado

Pod memory limits

pods are based on containers and containers don't do virtualization-style isolation, only process-based isolation. So which resources are visible from inside the pod is - well - everything.
cat /proc/meminfo
And then runpod relies on cgroups to enforce resource limits. So far-so-good. The issue is that most memory managers rely on memory free/busy when deciding to run garbage-collection or not. And in this case, that math is off since it will be based on entire system, not on pod usage itself. So GC will almost never run and as a result app may crash far more often due to out-of-memory. So, and ideas? Solution? Hints? In this case, its a Python app, but I don't think this is python specific, just python is in general bad with memory management. I can install cgroup-utils and check resource limits inside pod, but its not like i can reprogram Python's internal memory allocator to be based on that info. And for that matter, that also applies to general malloc as I've tried using tcmaloc and jemalloc as well. So far only solution - do regular app restarts.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?