Improper detection of available CPUs

Im running a 5 node cluster in kubernetes. Each k8 host has 56 cores but when I query for node information I get these values:

    "available_processors" : 1,
    "allocated_processors" : 1

Im using Java 12 so according to this the correct value is supposed to be passed to the container(s).

Furthermore - if I open a shell to a running container and run nproc I get the correct value (56).

Have I misconfigured something? Do I need to manually specify # of cores to the JVM?

  • Similar issue to this posting

Hi @ethrbunny

It is necessary to set a limit in your Kubernetes manifest. For example, if my host had 4 cores, it would be:

- name: elasticsearch
      cpu: 500m 
      memory: 4

Regards :vulcan_salute:


1 Like

So don't change the JVM arguments?

NM - I think I get it now. Will have a go at it.


Hi, @ethrbunny

I have not changed any JVM arguments. I have set a limit cpu and it worked :slight_smile:. There are some blogs on Internet that talk about this kind of issue. It depends on Java version and the proper application.

Regards :vulcan_salute:

1 Like