5 ms·
How does the JVM determine the number of cores on a Linux system by default?
by techman9 9y ago
How does the JVM determine the number of cores on a Linux system by default?
- kev009 9y agoI 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.
- joerg84 9y agoOne of the authors here: This is the OpenJDK 8 implementation: http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/tip/src/os/linux/vm/os_linux.cpp#l4967 http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/tip/src/os...