Re:Running Java in a Container
by techman9 on Wednesday March 21, 2018 @12:51AM
(#16635564)
How does the JVM determine the number of cores on a Linux system by default?
[ Parent
| on HN ]
One of the authors here: This is the OpenJDK 8 implementation: http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/tip/src/os...
I don't know the precise answer off hand, but probably in an OS dependent code path in OpenJDK. I know for instance OpenJDK uses the global sysctl API to get total RAM on a FreeBSD machine. To use jails as multi-tenancy system you therefore want to fake that API out to the resource controled max for the jail.