JEP [DRAFT]: Container aware Java

David Holmes david.holmes at oracle.com
Wed Aug 2 04:00:20 UTC 2017


Hi Bob,

Reading about the proposed CPU limit support:

---
number_of_cpus() = cpu_quota() / cpu_period().

Since it's not currently possible to understand the relative weight of 
the running container against all other containers, altering the 
cpu_shares of a running container will have no affect on altering Java's 
configuration.

---

I don't think this is workable. In short CPU quotas/shares/periods can 
not be effectively used to "size" the number of threads you need to get 
the right "utilization" of CPU resources. If there are 10 cpus available 
but you only have a 50% share you effectively get 5 cpus at 100%, but 
that doesn't translate to needing 5 threads! If you only have 5 threads 
you can only use 5 cpus, but you will still only get 50% of the time on 
those 5 cpus - giving the effect of 2.5 cpus.

IMHO only cpusets (the actual number of available processors) are 
relevant to sizing/configuring the VM itself, the libraries and even the 
application. Information about quotas/shares etc would be needed by 
application logic if it wanted to reason about its own performance 
characteristics (throughput, latency etc).

Cheers,
David


More information about the hotspot-dev mailing list