Rate This Document
Findability
Accuracy
Completeness
Readability

Configuration Description

Configuration File Description

Table 1 describes the configuration file.

Table 1 Configuration file description

Configuration File Path

Configuration File Name

Whether Configuration Is Required

Description

/usr/lib/systemd/system/vas-daemon.service

vas-daemon.service

Yes

vas-daemon service configuration file

Parameter Description

Table 2 describes the parameters.

Table 2 vas-daemon.service configuration 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.

Table 3 Service startup parameters

Parameter

Value

Description

-smt/--smt

Default value: true

The value can be:

  • true
  • false

CPU core allocation granularity: a Boolean parameter, which determines the core allocation policy.

  • If this parameter is set to true, the hyper-threading-level allocation is used.
  • If this parameter is set to false, the physical-core-level allocation is used.

-sp/--sched-policy

Default value: affinity

The value can be:

  • dynamicAffinity
  • affinity

Scheduling policy configuration: specifies the vCPU thread affinity mode.

  • dynamicAffinity: enables dynamic CPU core affinity.
  • affinity: enables static CPU core binding.

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.

  • Enabled (by default): echo DA_UTIL_TASKGROUP > /sys/kernel/debug/sched/features
  • Disabled: echo NO_DA_UTIL_TASKGROUP > /sys/kernel/debug/sched/features

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:

  • true
  • false

CPU core reallocation range: a Boolean parameter, which determines the CPU core reallocation policy.

  • If this parameter is set to true, VMs with any CPU core binding range (including the unspecified CPU core binding range) can be tuned.
  • If this parameter is set to false, only VMs whose CPU core binding range is a single NUMA node can be tuned.

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:

  1. Log in to the iBMC WebUI.
  2. Choose System > BIOS Settings.
  3. Select AdvancedMenu > PowerAndPerformanceConfiguration > CPUPMControl.
  4. Set SMT2En to Enabled.