11 ms·
Thanks for your elaborate notes! This is helpful information. When I tried your commands, on Arch via libcgroup-git, `cgcreate -g cpu:cpulimit` only results in
by phil294 5y ago
Thanks for your elaborate notes! This is helpful information.
When I tried your commands, on Arch via libcgroup-git, `cgcreate -g cpu:cpulimit` only results in `cgcreate: can't create cgroup cpulimit: Cgroup, requested group parameter does not exist`, for some reason. But this is not a support ticket, I have not researched this at all yet. But cgroups only limit some processes anyway, never the entire core(s) - so it seems one could also simply use cpulimit [1] instead which emulates by sending SIGSTOP and SIGCONT.
About cooling_deviceN: While this does limit cpu functionality, this seems to only also set `scaling_max_freq` to an appropriate value, throttling because the fans are disabled. Not more useful than setting the frequency manually I presume.
[1] https://github.com/opsengine/cpulimit https://github.com/opsengine/cpulimit
- exikyut 5y ago*Makes this a tiny support ticket* :) A bit of cursory googling around for that error didn't find anything particularly insightful, surprisingly. Most of the references were extremely obscure. The only consistent theme I saw was "cgroups is not loaded or broken", but that doesn't make sense: systemd depends on cgroups, IIUC. And cgroups itself was introduced in the 2.6.x era. Honestly the only idea I can think of is asking on unix.stackexchange.com or #archlinux on irc.libera.chat. I'm curious what syscall failures `strace -o cgcreate.txt -s999 -v -f cgcreate -g cpu:cpulimit` might reveal. I'm also very interested to know whatever the root cause ends up being! TIL that the cooling_deviceN trick does that on some systems. On the boxes I have here it basically slows everything to a crawllllll, especially if turned up to 11. I've always looked at `cpulimit` as somewhat of an awkward hack. Yes, it works, but it's like bit-banging vs hardware I/O, or CPU vs GPU, or rapid polling instead of push/async. I kind of squint plaintively at it a bit. If it was all I had in an 11th hour situation then sure, but if I was deploying something to production I wanted to forget about? Eeeeeehh....