5 ms·
Only slightly relevant question, when benchmarking a multi-process job, such as compilation, the timings of a single job-unit vary greatly between runs, as they
by scoopr 5y ago
Only slightly relevant question,
when benchmarking a multi-process job, such as compilation, the timings of a single job-unit vary greatly between runs, as they might be scheduled to a complete different class cores, so comparing stuff like clang's `-ftime-trace` becomes exceedingly difficult.
So the question is, has someone found a way to force macos/terminal session/command invocation to run only on certain types of cores, for benchmarking purposes? I would imagine, command akin to caffeinate, but that would force the qos or available cores on all child processes would be ideal, but so far I haven't found a way to do that.
- vondro 5y agoI believe you can force low QoS processes to run only on E cores, but you cannot force high QoS processes to run exclusively on P cores. Even with high QoS set, you can find your process on E cores.
- Pulcinella 5y agoThis talk goes into it a bit more: https://developer.apple.com/videos/play/tech-talks/110147 https://developer.apple.com/videos/play/tech-talks/110147 So it is possible to get a bit more control, at least on Apple ARM chips, but it’s intended for games. They even mention professional apps needing high performance are able to get the performance they need with the normal Dispatch APIs. There is no locking threads to cores, but you can set thread affinities as hints if you think certain threads should or should not share L2 cache (at least for intel based Macs). https://developer.apple.com/forums/thread/44002 https://developer.apple.com/forums/thread/44002