Environment Variables
This section describes the environment variables that may need to be configured for using KQMalloc. Set the environment variables as required after installing KSL.
Variable |
Description |
Default Value |
Value Range |
|---|---|---|---|
KQMALLOC_ALIGNMENT |
Sets the memory alignment size, in bytes. |
4 (incompatible with the C11 standard) |
4; 8; 16; 32; 64; 128 |
KQMALLOC_C11_COMPLIANT_PROCESSES |
Sets the list of processes compatible with the C11 standard. The memory alignment size of these processes is 16 bytes by default. |
Empty string |
List of process names separated by colons (:), for example, java8:java15 |
KQMALLOC_USE_THP |
Sets whether to use transparent huge pages. |
1 |
|
KQMALLOC_USE_HBM |
Specifies whether to use high-bandwidth memory to support 16 to 31 NUMA nodes. If this function is enabled, libnuma.so needs to be linked. |
0 |
|
The following uses KQMALLOC_ALIGNMENT as an example to describe how to configure environment variables.
- Open the /etc/profile file.
1vi /etc/profile - Press i to enter the insert mode and add the following content to the /etc/profile file.
export KQMALLOC_ALIGNMENT=16
- Run the following command to validate the environment variable:
source /etc/profile