3 ms·
This 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 th
by gcanyon 4y ago
This 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.