22.3. 使用 systemd 分配系统资源

流程

要更改服务的单元文件选项所需的值,您可以调整单元文件中的值,或使用 systemctl 命令:

  1. 检查您选择的服务的分配值。

    # systemctl show --property <unit file option> <service name>
  2. 设置 CPU 时间分配策略选项的必要值:

    # systemctl set-property <service name> <unit file option>=<value>

验证步骤

  • 检查您选择的服务新分配的值。

    # systemctl show --property <unit file option> <service name>

其他资源

  • systemd.resource-control (5)systemd.exec (5) 手册页