HN user

jpolidor

1 karma
Posts1
Comments7
View on HN

Then in Java, if you don't set the limits, it gets the CPU from the VM via Runtime.getRuntime().availableProcessors()... this method returns the number of CPUs of the VM or the value set as CPU Quota. Starting from Java 11 the -XX:+PreferContainerQuotaForCPUCount is by default true. For Java <= 10 the CPU count is equal to the CPU shares. That method then is used to calculate the GC threads, fork join pool size, compiler threads etc. The solution would be to set -XX:ActiveProcessorCount=X where X is ideally the CPU shares value but as we know shares can change over time, so you would change this value over time...

Edit: or set -XX:-PreferContainerQuotaForCPUCount

Location: Milan (Italy)

Remote: Can do Hybrid/On-site, Remote Preferred

Willing to relocate: Yes

Technologies: Kubernetes, Docker, Java 11/17 (Spring Boot), Kafka, CI/CD (Tekton CI, ArgoCD), EFK Stack, Fluentd/FluentBit

Résumé/CV: https://www.linkedin.com/in/justinpolidori/

Email:jobs@justinpolidori.it

I am a DevOps Engineer with 6+ years of experience working on DevSecOps / Backend related technologies with strong technical skills on Kubernetes, Docker, CI/CD and expertise on Spring Boot applications (Java 11/17), Kafka, Redis. During my spare time I write posts on www.justinpolidori.it

  Location: Italy (Milan)
  Remote: Yes
  Willing to relocate: Yes
  Technologies: Kubernetes, Docker, Prometheus, EFK stack, Redis, Kafka, MongoDB, ArgoCD, Tekton
  Résumé/CV: https://www.linkedin.com/in/justinpolidori/
  Email: justpolidor [at] gmail [dot] com