Problem statement
We are currently not setting GOMAXPROCS on ESS / ECE or deriving the value from docker container limits. This is normally not an issue except when APM Server is run on a containerized environment, which results in the GOMAXPROCS being set to the total number of CPUs for that machine.
On CPU intensive programs like the APM Server, this issue is worsened when container CFS quotas are used to limit the number of resources that docker containers have access to, which is something that we do in ESS / ECE. This seems to lead to increased throttling and decreased performance for the APM Server.
Possible solution
We should investigate how to perhaps auto tune the GOMAXPROCS setting by setting it to the actual CFS CPU quota (if any). Uber has an autogomaxprocs library we should look into using: https://github.com/uber-go/automaxprocs
Related issues
Problem statement
We are currently not setting
GOMAXPROCSon ESS / ECE or deriving the value from docker container limits. This is normally not an issue except when APM Server is run on a containerized environment, which results in theGOMAXPROCSbeing set to the total number of CPUs for that machine.On CPU intensive programs like the APM Server, this issue is worsened when container CFS quotas are used to limit the number of resources that docker containers have access to, which is something that we do in ESS / ECE. This seems to lead to increased throttling and decreased performance for the APM Server.
Possible solution
We should investigate how to perhaps auto tune the
GOMAXPROCSsetting by setting it to the actual CFS CPU quota (if any). Uber has anautogomaxprocslibrary we should look into using: https://github.com/uber-go/automaxprocsRelated issues
gomaxprocson cloud #1841GOMAXPROCScfs-aware onGOOS=linuxgolang/go#33803