Configuration Description
Configuration File Description
Table 1 describes the configuration file.
Parameter Description
Table 2 describes the parameters.
No. |
Configuration Section |
Parameter |
Description |
Value |
Node |
Application Scenario |
|---|---|---|---|---|---|---|
1 |
[Unit] |
Description |
Service function description |
virtual machine schedule daemon |
All |
All |
2 |
[Unit] |
After |
Startup dependency |
network.target (startup after network services) |
All |
All |
3 |
[Service] |
Type |
Service type |
simple (basic service type, direct startup) |
All |
All |
4 |
[Service] |
User |
Running user |
root |
All |
All |
5 |
[Service] |
Group |
Running user group |
root |
All |
All |
6 |
[Service] |
RestartSec |
Restart interval |
Default value: 5 Unit: second |
All |
All |
7 |
[Service] |
Restart |
Restart policy |
on-failure (restart only upon failures) |
All |
All |
8 |
[Service] |
CPUQuota |
Maximum CPU usage |
100% |
All |
All |
9 |
[Service] |
MemoryLimit |
Maximum memory usage |
128M |
All |
All |
10 |
[Service] |
ExecStart |
Startup command |
/usr/local/vas/bin/vas_daemon start server -smt true --sched-policy affinity --dynamic-util-thresh 85 --skip-cpuset "" --range-affinity true |
All |
All |
11 |
[Install] |
WantedBy |
Installation mode |
multi-user.target (multi-user mode) |
All |
All |
Service Startup Parameters
Table 3 describes the service startup parameters.
Parameter |
Value |
Description |
|---|---|---|
-smt/--smt |
Default value: true The value can be:
|
CPU core allocation granularity: a Boolean parameter, which determines the core allocation policy.
|
-sp/--sched-policy |
Default value: affinity The value can be:
|
Scheduling policy configuration: specifies the vCPU thread affinity mode.
The default mode is affinity. Dynamic CPU core affinity relies on the kernel features. You need to add the Linux command line parameter dynamic_affinity=enable. The parameter takes effect after the OS is restarted. |
-daut/--dynamic-util-thresh |
Default value: 85 Value range: [0, 100] |
CPU core usage threshold in dynamic affinity mode: an integer ranging from 0 to 100. The default value is 85. You are advised to change it to 50. DA_UTIL_TASKGROUP controls whether the core selection range is determined based on the preferred CPU core usage by the task group or the total preferred CPU core usage.
Dynamic selection based on the total CPU core usage is used only when this switch is disabled. |
-scs/--skip-cpuset |
Default value: null Parameter type: string |
Core skip management configuration: a string parameter, which defines the cluster to be excluded when CPU cores are allocated to vCPUs, that is, the CPU cores specified by this parameter are ignored. The default value is empty. For example, if you want to exclude CPU cores 0 to 3 and CPU core 10, set this parameter to 0-3,10. |
-ra/--range-affinity |
Default value: true The value can be:
|
CPU core reallocation range: a Boolean parameter, which determines the CPU core reallocation policy.
|
Example
The default configuration of the vas-daemon.service file is as follows:
[Unit] Description=virtual machine schedule daemon After=network.target [Service] Type=simple User=root Group=root RestartSec=5s CPUQuota=100% MemoryLimit=128M ExecStart=/usr/local/vas/bin/vas_daemon start server -smt true --sched-policy affinity --dynamic-util-thresh 85 --skip-cpuset "" --range-affinity true Restart=on-failure CapabilityBoundingSet=CAP_CHOWN CAP_DAC_OVERRIDE AmbientCapabilities=CAP_CHOWN CAP_DAC_OVERRIDE [Install] WantedBy=multi-user.target
The SMT startup parameter is used to configure CPU resource allocation in hyper-threading scenarios. If hyper-threading is disabled, the configuration does not take effect. The SMT mode must be enabled in the BIOS boot options (new Kunpeng 920 processor models and later support SMT). To enable the SMT mode, perform the following steps:
- Log in to the iBMC WebUI.
- Choose System > BIOS Settings.
- Select AdvancedMenu > PowerAndPerformanceConfiguration > CPUPMControl.
- Set SMT2En to Enabled.