25.3. 使用 systemd 分配系统资源
使用 systemd 分配系统资源涉及创建和管理 systemd 服务和单元。这可以被配置为在特定时间启动、停止或重新启动,或者响应某些系统事件。您可以更改服务的单元文件选项的值,或使用 systemctl 命令。
流程
使用
systemctl命令。检查为您选择的服务分配的值:
# systemctl show --property <unit file option> <service name>设置 CPU 时间分配策略选项的必要值:
# systemctl set-property <service name> <unit file option>=<value>如需更多信息,请参阅
systemd.resource-control (5)和systemd.exec (5)手册页。
验证
检查为您选择的服务新分配的值:
# systemctl show --property <unit file option> <service name>