3 ms·
I 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
by juliusgeo 4y ago
I 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.