3 ms·
I have one gripe with these awesome machines, the cpu core scheduling. As part of developing our application we run benchmarks. Now every so often we get strang
by spockz 2y ago
I have one gripe with these awesome machines, the cpu core scheduling. As part of developing our application we run benchmarks. Now every so often we get strange performance dips that I can only attribute to either or both the load generation process or the application process temporarily being scheduled on an efficiency core.
On macOS native there would be profilers I could use to at least detect it. But when using docker that gets all smudged into a single vm process.
Does anyone know how to detect this? Or better prevent? The only way I found is making a development kernel build to switch the boot core to a performance core and then disable all efficiency core. This is not practical on company hardware.
- saagarjha 2y agoIf you quiesce the rest of the VM then you should be able to correlate the CPU usage of the virtualization process to your workload, right?
- spockz 2y agoIn our setup we have multiple processes. The application that we are benchmarking itself, plus our the process that generates the load plus any optional dependencies of the application. These all are scheduled over the number of cores of the docker vm. From the outside it is hard to track which internal process was scheduled where.
- andruby 2y agoYou can use “taskpolicy - b <command>” on MacOS cli to force it on a performance core. I’ve had to use it when doing benchmarking as I also noticed variations due to migrations. Not sure if you can combine that with docker though.
- spockz 2y agoThank you that is nice. I will try tomorrow to see whether it has effect. According to the man page I need `-B`: Move target process out of PRIO_DARWIN_BG. This will still allow scheduling on both the performance and the efficiency cores though. No way to only pin it to performance cores