3 ms·
I can't see how it's EE only. It reads the appropriate bits to work out the memory available, can't see how CE would hide that. The problem is wider than Java
by sofaofthedamned 9y ago
I can't see how it's EE only. It reads the appropriate bits to work out the memory available, can't see how CE would hide that.
The problem is wider than Java anyways. Containers see the system free memory, not what's available to that container regardless of the cgroup constraints. We've hit this many times and sometimes workarounds are available (mongodb) but sometimes they're not and in our k8s environment this means some pods will restart constantly when they try to cache over and above what their cgroup allows.
The real fix is to tell a container not the system free memory but that which it's been allowed to use - afaik this is really difficult to implement, which is why the kernel hasn't had this done yet.
EDIT: obvs the container could read the cgroup limits (which I assume is what Java 10 does) but all the userland tools would have to be changed as well as some kernel functions.
- e12e 9y agoHm, I wonder if this might possibly be related to an issue I've seen in production with docker - of a container being killed by the oom killer... But only on server boot.
- sofaofthedamned 9y agoMaybe. We've had serious problems with this, mostly with mongodb but other stuff as well.Java 10 is making an effort to fix this but I hate Java, and really it's a kernel/userland linux issue as you can't expect software not to request cache memory that it doesn't know exists.