3

I haven't found the answer by googling. I'm wondering because I can't make sense of what I see on my M1 MacBook Air when giving it a heavy load of BOINC jobs when on battery vs. plugged in. Screenshots show macOS assigning the four jobs to the same four cores, regardless of power source; I naively expected a difference. No matter what I try, BOINC runs only on the right four cores, never the left four, even when I give it eight jobs. But what are the MenuMeters left and right, performance or efficiency? Is BOINC doing the choosing?

Battery

Mains

7
  • I'm not convinced that the core-allocation is done at the OS level.
    – benwiggy
    Sep 6 at 15:44
  • Where in the screenshots do you see core assignment? What does Activity Monitor show in both cases?
    – nohillside
    Sep 6 at 16:47
  • Core assignments are the eight vertical bars in the MenuMeters display.
    – vonlost
    Sep 6 at 18:15
  • Activity Monitor doesn’t mention cores, shows only the running processes.
    – vonlost
    Sep 6 at 18:21
  • @benwiggy Core-allocation is certainly done by the operating system.
    – jksoegaard
    Sep 6 at 18:33
3

In general the developer of the software can choose (or at least strongly indicate to the operating system) which type of core to use. The developer sets a quality-of-service expectation and the operating system generally follows that.

In addition to the developer supplied QoS expectation, the operating system monitors the application's workload over a period of time, as well as the whole system's workload over a period of time, and use heuristics to make an overall decision on whether to schedule a specific thread on a P-core (performance) or E-core (energy).

Note that applications and background processes are treated differently in this respect. For example a GUI application could be treated differently whether its window(s) are in the foreground or in the background. For background processes (such as BOINC computation) that doesn't apply.

You can read a relatively non-technical overview of how it works here:

https://developer.apple.com/news/?id=vk3m204o

And a bit more specifics (but still overview information) about the QoS-classes here:

https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon

Note that it is actually often possible for you as the user to override the QoS-class set by the developer. Get the PID (process ID) of the BOINC job you want to affect (using for example Activity Monitor) - and then use the taskpolicy command to set a new quality-of-service class.

2

By the load set by you.

The more programs or more likely an algorithm that looks at the processor loading based on the activities in progress which brings in more or fewer cores as needed to meet a given performance rating.

Most processors will max out when provided with mains power and are throttled when on battery for a longer life.

3
  • Is that generically, or MacOS M1-specific? My M1 has four + four cores. MenuMeters shows the eight cores as individual vertical bars. I run four processes of BOINC at 100%. Plugged into mains, the rightmost four bars are filled. On battery the rightmost four bars are also filled. I don't know if the rightmost are performance or efficiency cores (anyone know MenuMeters source code?). Perhaps BOINC tells MacOS to always use only one kind of processor.
    – vonlost
    Sep 6 at 5:27
  • @vonlost Why would MenuMeters publicly publish their source code?
    – Solar Mike
    Sep 6 at 6:47
  • MenuMeters is open source, but I haven't looked at it. member.ipmu.jp/yuji.tachikawa/MenuMetersElCapitan
    – vonlost
    Sep 6 at 13:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .