News for hackers. Stuff that matters.
Re:Solving Out of Memory Issues in Linux at Redpanda by kube-system on Thursday July 07, 2022 @01:42PM (#32017011)
I can't wait for swap support in k8s (at the pod level).

I've got a bunch of burst-y workloads that not easy to predict, and when they're running at their peak, they're doing important stuff that I'd rather not be terminated. Over-provisioning is one way to handle it, but then I risk OOM-ing the entire node. Throwing more memory at it is another solution but then we're paying a ton of money to let memory sit around unused.

Re:Solving Out of Memory Issues in Linux at Redpanda by RafalKorepta on Thursday July 07, 2022 @01:53PM (#32017168)
Is there any KEPs?
Re:Solving Out of Memory Issues in Linux at Redpanda by kube-system on Thursday July 07, 2022 @01:59PM (#32017243)
Re:Solving Out of Memory Issues in Linux at Redpanda by jeffbee on Thursday July 07, 2022 @02:18PM (#32017451)
This article is a little confusing, so I just want to clarify something for the audience. It makes it sound like OOM killing is asynchronous, but it is not. The OOM killer kicks in as soon as you try to realize more memory than your cgroup's limit. The kernel will first attempt to reclaim memory and if that fails it will kill something. There isn't some grace period during which your cgroup can skate along over its limit.
Re:Solving Out of Memory Issues in Linux at Redpanda by kevin_nisbet on Thursday July 07, 2022 @12:59PM (#32016468)
Another area to consider is kernel memory accounting in the cgroup. So Kernel memory for sockets and the like, can get counted for in the cgroup / kubernetes pod. So this is another area where you shouldn't give 100% of the memory to the application if it needs to communicate or is busy on the network.
Re:Solving Out of Memory Issues in Linux at Redpanda by jeffbee on Thursday July 07, 2022 @02:13PM (#32017400)
It's also possible to boot with kmem accounting disabled, and I recommend it. Yes, it makes the accounting approximate, but kmem accounting is fundamentally unfair. Random cgroups get victimized by owning random slabs, and kernel reclaim is a mess of bugs.
Re:Solving Out of Memory Issues in Linux at Redpanda by benpope on Thursday July 07, 2022 @05:41PM (#32019860)
This is exactly the reason for the default 10% buffer between what we tell seastar it can have, and what we request for the cgroup with K8s.

In one case we saw that the kernel was unable to allocate a TCP buffer, so it decided to OOMKill Redpanda.

Re:Solving Out of Memory Issues in Linux at Redpanda by nojito on Thursday July 07, 2022 @01:31PM (#32016891)
Redpanda is just amazing. it's definitely a sleeper project..but I love having it as a secret weapon.
Re:Solving Out of Memory Issues in Linux at Redpanda by mi_lk on Thursday July 07, 2022 @02:30PM (#32017617)
say more? In what ways is it amazing
Re:Solving Out of Memory Issues in Linux at Redpanda by somenewaccount1 on Thursday July 07, 2022 @01:37PM (#32016956)
Tl;Dr, set memory constraints for you k8s containers, kubernetes-101.
Re:Solving Out of Memory Issues in Linux at Redpanda by RafalKorepta on Thursday July 07, 2022 @01:51PM (#32017140)
True, it is harder when you need to maximize resource utilization. The k8s scheduler did want we requested, but seastar and memory allocation in Redpanda show us (OOM) that POD sandbox has some overhead.