Rate This Document
Findability
Accuracy
Completeness
Readability

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.

Table 1 Environment variables of KQMalloc

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

  • 1: enabled
  • 0: disabled
  • -1: not specified

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

  • 1: enabled
  • 0: disabled

The following uses KQMALLOC_ALIGNMENT as an example to describe how to configure environment variables.

  1. Open the /etc/profile file.
    1
    vi /etc/profile
    
  2. Press i to enter the insert mode and add the following content to the /etc/profile file.
    export KQMALLOC_ALIGNMENT=16
  3. Run the following command to validate the environment variable:
    source /etc/profile