3 ms·
I don’t know how you would do this, other than setting core affinity, but I’m surprised I can’t limit processing power or RAM per process on any modern OS. Bot
by andrewmcwatters 5y ago
I don’t know how you would do this, other than setting core affinity, but I’m surprised I can’t limit processing power or RAM per process on any modern OS.
Both for setting restrictions per another comment here, but also for testing purposes.
Like, I’d love to be able to run an executable with equivalent processing power to that of a specific CPU generation.
- Etheryte 5y agoOn macOS, there is a legacy CPU throttler called AppPolice [0] which as of right now still works on Catalina, despite the last release being made in 2016 (!). The user experience is very flaky, but it can help out when it's really needed. I haven't tested it on Big Sur. Definitely agree though, this is something that should be baked into the OS as a first class citizen, especially in the modern era of Electron-all-the-things. [0] https://github.com/AppPolice/AppPolice https://github.com/AppPolice/AppPolice
- delusional 5y agoOn linux you could use cgroups and cfs_quota: https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.h...
- phaemon 5y agoSurely you can with cgroups? Isn't that exactly what they're for?
- opencl 5y agoOn Linux there's a tool called cpulimit that does this, or you can use cgroups as others have mentioned. https://manpages.ubuntu.com/manpages/xenial/man1/cpulimit.1.html https://manpages.ubuntu.com/manpages/xenial/man1/cpulimit.1....
- andrewmcwatters 5y agoThank you for this insight!