MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
my_system_api.h File Reference

Go to the source code of this file.

Functions

uint64_t my_cgroup_mem_limit ()
 Read the memory limit set by the container. More...
 
uint32_t my_cgroup_vcpu_limit ()
 Read the CPU limit set by the container. More...
 
uint32_t num_vcpus_using_affinity ()
 Find number of VCPUs as seen by the current process based on the affinity between each process and VCPU. More...
 
uint32_t num_vcpus_using_config ()
 Get the number of VCPUS based on system configuration. More...
 
uint32_t my_system_num_vcpus ()
 Get the number of VCPU. More...
 

Function Documentation

◆ my_cgroup_mem_limit()

uint64_t my_cgroup_mem_limit ( )

Read the memory limit set by the container.

Try cgroup v2, and then cgroup v1

Returns
memory limit set by cgroup v2 or cgroup v1; or 0
Note
Return value of 0 implies either no limits are set or server is not running in a container

◆ my_cgroup_vcpu_limit()

uint32_t my_cgroup_vcpu_limit ( )

Read the CPU limit set by the container.

Try cgroup v2, and then cgroup v1

Returns
CPU limit set by cgroup v2 or cgroup v1; or 0
Note
Return value of 0 implies either no limits are set or server is not running in a container

◆ my_system_num_vcpus()

uint32_t my_system_num_vcpus ( )

Get the number of VCPU.

◆ num_vcpus_using_affinity()

uint32_t num_vcpus_using_affinity ( )

Find number of VCPUs as seen by the current process based on the affinity between each process and VCPU.

◆ num_vcpus_using_config()

uint32_t num_vcpus_using_config ( )

Get the number of VCPUS based on system configuration.