Skip to main content

Why is my Unity server vCPU usage unexpectedly high?

Unity has an issue where it incorrectly determines the number of threads available to it when running in a container. The result is that vCPU usage becomes much higher than expected.

Try setting the job worker count (JobWorkerCount) to a lower number (e.g. 4):

  • in a startup script: JobsUtility.JobWorkerCount = 4;
  • via command line argument -job-worker-count 4

You may need to tweak the job worker count value to find teh optimal one for your use case.

Relevant Unity docs: