-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OrientDB's available memory estimate ignores cgroup (container) limits #7812
Comments
OK, for now, we will implement only cgroup v1 support. Later we will add cgroup 2, but in a separate issue. Taking in account that very few distr us cgroup v2 version. I think it is completely OK for now. Sad thing is that docker does not use "cgroup" namespace of course but at least /sys/fs/cgroup is provided. |
andrii0lomakin
added a commit
that referenced
this issue
Oct 26, 2017
andrii0lomakin
added a commit
that referenced
this issue
Oct 26, 2017
andrii0lomakin
added a commit
that referenced
this issue
Nov 10, 2017
taken into account. Making Orient initialization not static. New logger methods.
andrii0lomakin
added a commit
that referenced
this issue
Nov 10, 2017
Fixed in 2.2.x branch will be in 3.0 soon. |
andrii0lomakin
added a commit
that referenced
this issue
Nov 13, 2017
andrii0lomakin
added a commit
that referenced
this issue
Nov 13, 2017
andrii0lomakin
added a commit
that referenced
this issue
Nov 14, 2017
andrii0lomakin
added a commit
that referenced
this issue
Nov 16, 2017
Fixed |
Thank you, @Laa! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OrientDB Version: 2.2.29
Java Version: OpenJDK 8
OS: Linux
When calculating the available system memory to use as a disk cache, OrientDB currently uses the formula
total system memory - JVM heap size - 2GB
.This ignores the fact that OrientDB may be running on, say, a 64GB RAM system, but inside a docker container that is only allowed to use 10GB maximum. This means that OrientDB will keep using more and more memory, thinking there's plenty of capacity, until it gets terminated by the operating system's OOM killer for exceeding its allocated limit.
As a workaround until this issue can be fixed, if you run OrientDB in a container, I recommend setting the
-XX:MaxDirectMemorySize
option in theORIENTDB_OPTS_MEMORY
environment variable. Keep in mind that the direct memory consumption is on top of the heap and stack memory, so leave some breathing room between the sum of these three values and the container memory limit.Expected behavior
OrientDB should be aware of any cgroup limits that might apply to it. Other projects have had similar issues in the past, and have developed fixes. OpenBLAS and YARN are two examples.
Actual behavior
OrientDB is not aware of the cgroup limits, and keeps allocating memory until it gets killed by the OS.
Steps to reproduce
--memory
option set to significantly less than 64GB, e.g. 6GB.The text was updated successfully, but these errors were encountered: