I'm deploying elasticsearch on kubernetes engine on GCP and running into aperformance issue. Elasticsearch determines the size of various thread pools based on the number of cores. Even though I have an 32 core VM created, the thread pool size is just 1.
I did write a test program to print the Runtime.getRuntime().availableProcessors() and it just prints as 1.
I guess it has something to do with the "Container-Optimized OS" which is the only OS allowed on the VMs using Kubernetes Engine. When i create an Debian VM on GCP the Runtime.getRuntime().availableProcessors() returns 8. Not sure how is elasticsearch is being used on the GCPs kubernetes engine. Any ideas or suggestions are welcome.
When i create an Debian VM on GCP without kubernetes, the Runtime.getRuntime().availableProcessors() returns 8.
you can try
-XX:ActiveProcessorCount=[host_cpu_count]
and then
Runtime.getRuntime().availableProcessors()
will return
host_cpu_count
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With