Java application gets incorrect number of available CPUs in OpenShift
Issue
- Why my Java application gets incorrect number of available CPUs in OpenShift
- Why
Runtime.getRuntime().availableProcessors()
method returns incorrect number of processors available to the JVM? this will cause unexpected results and slowness in our application
Environment
- OpenShift Container Platform
- Java 8
- OpenJDK prio to 8u191
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.