Updated on 2024-10-18 GMT+08:00

Introduction to the qt-enclave-env

The qt-enclave-env is a service. After the service is started, it reads isolation information from the qt-enclave-env.conf configuration file and isolates resources. Resources must be isolated before the QingTian Enclave instances are created.

The following describes the content in the configuration file /etc/qingtian/enclave/qt-enclave-env.conf.

#Configure the size of hugepages to be isolated for the QingTian Enclave instance. The value can be 2 or 1024, indicating 2 MiB or 1 GiB hugepages, respectively.
hugepage_size:1024 
# Configure the size of the memory to be isolated. The value must be an integer multiple of the hugepage size.
memory_mib:1024 
# Configure the number of vCPUs to be isolated. This configuration item and cpu_list are mutually exclusive, or the service will fail to be started.
cpu_count:2 
# Configure lists of the vCPUs to be isolated. A CPU ID other than 0 can be entered. This configuration item and cpu_count are mutually exclusive, or the service will fail to be started.
# cpu_list:2,3

Note that whether the hugepage memory is successfully reserved by the qt-enclave-env service is affected by memory fragmentation of the parent instance. If the system has been running for a long time or the qt-enclave-env service is restarted repeatedly, the hugepage memory may fail to be reserved. To avoid this issue, you are advised to start the qt-enclave-env once after the system is started, which helps to reserve sufficient memory.