The macOS SDK exposes a processor affinity API that you can program against. With ARM you can also selectively turn on and off cores. For example, when traveling with the work Linux laptop I turn the big cores off to drastically improve battery life. And this can be done at runtime not just at boot.
To offline a core:
echo 0 > /sys/devices/system/cpu/cpuN/online
To online a core:
echo 1 > /sys/devices/system/cpu/cpuN/online
Where cpuN is 0-4.
Keep in mind there's always one core you cannot disable to process interrupts.
Interacting with Cores As A Developer
The macOS SDK exposes a processor affinity API that you can program against. With ARM you can also selectively turn on and off cores. For example, when traveling with the work Linux laptop I turn the big cores off to drastically improve battery life. And this can be done at runtime not just at boot.
To offline a core:
To online a core:
Where cpuN is 0-4.
Keep in mind there's always one core you cannot disable to process interrupts.
Share
Create your profile
Only paying subscribers can comment on this post
Check your email
For your security, we need to re-authenticate you.
Click the link we sent to , or click here to log in.