5 ms·
The M1 chips have two types of cores: high-performance "Firestorm" cores and energy-efficient "Icestorm" cores, which are much slower. It is indeed possible to
by xenonite 4y ago
The M1 chips have two types of cores: high-performance "Firestorm" cores and energy-efficient "Icestorm" cores, which are much slower.
It is indeed possible to constrain a process to the Icestorm cores using taskpolicy:
> taskpolicy -b -p 567
where 567 needs to be replaced by the process id.
Reference: https://eclecticlight.co/2022/10/20/making-the-most-of-apple-silicon-power-5-user-control/ https://eclecticlight.co/2022/10/20/making-the-most-of-apple...
- dsnr 4y agoThis is some TIL material, and looks like a really viable option.
- jonpurdy 4y agoYou can also do this with GUI apps like App Tamer※. I use this myself to limit CPU consumption of hidden background apps (but not visible apps in the background), optionally running on the Icestorm cores only as well. Lots of options and ways of being configured. ※ - https://www.stclairsoft.com/AppTamer/index.html https://www.stclairsoft.com/AppTamer/index.html
- kelsolaar 4y agoAwesome app, thanks for sharing!
- gcanyon 4y agoThis makes me want to constrain every web page to the icestorm cores. If a web page wants more than ~5% of a CPU, I want that web page to die. Actually, now that I think about it, I'm almost tempted to write a script to do just that, and either relegates CPU-hogging processes to the icestorm cpus or just kill -stop <process id> them
- juliusgeo 4y agoI tried to implement what you said on my M1 2020 MBP. Heres's the one liner (albeit using 0% of CPU as the cutoff, and only throttling Safari processes): ps axo pid,%cpu,command -r | awk '{ if ($2 >= 0 && $3~/WebContent/ ) { print $1 } }' | xargs -L 1 taskpolicy -b -p You could set this up to run at whatever interval, and it should work. Using browserbench.org/Speedometer2.0/, before running this one liner I get a score of 274. Afterwards, I get a score of 33.6. EDIT: Fixed url
- MonkeyClub 4y agohttps://browserbench.org/ https://browserbench.org/ (instead of ..benchmark..), right?
- juliusgeo 4y agoOops, my bad. That's correct.
- MonkeyClub 4y agoUgh, I ran it, then sat back amazed: I hadn't realized my computer is so crap!
- juliusgeo 4y agoOne caveat to note[1] is that apparently you cannot promote those threads back onto the performance cores using setpolicy. [1] https://eclecticlight.co/2022/01/24/how-you-cant-promote-threads-on-an-m1/ https://eclecticlight.co/2022/01/24/how-you-cant-promote-thr...
- gcanyon 4y agoI would be perfectly fine with that.
- gcanyon 4y agoThis looks awesome! I already have a periodic script that archives my desktop and downloads (clean desktop for life!) but it only runs hourly. That said, it would be worth it to run this every minute, or maybe even more often. I assume this is almost zero-weight to run, but we'll see about that.
- dsnr 4y agoOne thing I noticed is that browser tabs each have their own process id. Would applying the policy on the main process affect each child tab process?
- AA-BA-94-2A-56 4y agoI had a piece of software that did this, and it turned out the energy-efficient cores are still really fast.