Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NumVCPU ¶
func NumVCPU() int
NumVCPU returns the number of virtualizes CPUs available to the process. It should be used instead of runtime.NumCPU() in virtualized environments like K8s to ensure that processes don't attempt to over-subscribe CPUs. For example, on a 16 vCPU machine in a docker container allocated 8 vCPUs, runtime.NumCPU() will return 16 but NumVCPU() will return 8.
func SetMaxProcs ¶
func SetMaxProcs()
SetMaxProcs sets the GOMAXPROCS for the go runtime to a sane value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.