I would like to change the DefaultCPUAccounting to “yes” to restrict some resource heavy systemd services. While the result of
systemctl show -p DefaultCPUAccounting
is
DefaultCPUAccounting=no
I understand I can create custom systemd services/slices at /storage/.config/system.d ,but creating a system.conf there seems not working even after a systemctl daemon-reload.
OK for anyone interested, I remove the # before the comment in /etc/systemd/system.conf:
DefaultCPUAccounting=yes
save the file to a local copy, and create a folder on the building machine: /CoreELEC/projects/Amlogic-ce/filesystem/etc/systemd/system.conf.d
Copy the updated system.conf to this folder and manually compiled one 21.1, now the CPUAccounting is enabled (which is disabled by default before kernel 5.15 according to the systemd man page). So I can control CPU usage using slice file.