(no title)
richdougherty | 2 years ago
- "The JVM has been modified to be aware that it is running in a Docker container and will extract container specific configuration information instead of querying the operating system. The information being extracted is the number of CPUs and total memory that have been allocated to the container." https://www.oracle.com/java/technologies/javase/8u191-relnot...
- Here's a more detailed explanation and even a shared library that can be used to patch container unaware versions of Java. I wonder if the same could be done for Go?
"LD_PRELOAD=/path/to/libproccount.so java <args>"
https://stackoverflow.com/a/64271429
https://gist.github.com/apangin/78d7e6f7402b1a5da0fa3abd9381...
-
There are more recent changes to Java container awareness as well:
https://developers.redhat.com/articles/2022/04/19/java-17-wh...
jpolidor|2 years ago
Edit: or set -XX:-PreferContainerQuotaForCPUCount