[Developer help] Can any mac developer help test this process reprioritisation code?

So I posted this question a while back on unix.stackexchange and got no answers. I'll copy the details here (note: I've rewwritten) because it basically explains what I want to explain in this post:

I am trying to test out the renice command on my Mac, it seems to be having no effect. This is how I'm testing it:

I have a dual core CPU with hyper threading, so I run 6 instances of node -e 'while(1){}' which, combined, max out my CPU. (Alternatively, run while true; do echo running > /dev/null ; done if you dont have node.)

I then get a PID of one of the node processes, either by the activity monitor application or pgrep, and then run sudo renice -n 19 -p $PID.

By looking at the activity monitor application or htop, the CPU usage of all of the node processes are still equivalent.

The last sentence shows my problem – renice has no effect. I have tried this method on Ubuntu and it works – the CPU usage lowers for the reniced process as expected.

Would some developer (or someone else experienced enough with the terminal) be able to try replicate this issue? If so, that would be great to know. I have submitted this bug to Apple, but they will take forever to do something about this (and I really need renice to work!).

submitted by /u/dylanthepiguy2


You might also like More from author

Leave A Reply

Your email address will not be published.