cgroup

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableCPUs

func AvailableCPUs() int

AvailableCPUs returns the number of available CPU cores for the app.

The number is rounded to the next integer value if fractional number of CPU cores are available.

func GetGOGC

func GetGOGC() int

GetGOGC returns GOGC value for the currently running process.

See https://golang.org/pkg/runtime/#hdr-Environment_Variables for more details about GOGC

func GetHierarchicalMemoryLimit

func GetHierarchicalMemoryLimit() int64

GetHierarchicalMemoryLimit returns hierarchical memory limit https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

func GetMemoryLimit

func GetMemoryLimit() int64

GetMemoryLimit returns cgroup memory limit

func SetGOGC

func SetGOGC(percent int)

SetGOGC sets GOGC to the given percent

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL