What was reported:- Macbooks have a “low power” mode which you can toggle on and off.
- What is expected is that “low power” on would mean that there is less power consumed by the device which should also result in lower performance (higher render times).
-
The issue: What actually happens is that with “low power” on, the performance is better (render times are lower).
How we tested:- We used a MacBook Pro 16 inch 2021 (Apple M1 Pro with 10-core CPU, 16-core GPU, 16-core Neural Engine)
- We used Corona 9 HF1
- We also tested with V-Ray
- We also tested on an M1 Mac Mini
Monitoring:- In Terminal for frequency and power: sudo powermetrics --samplers cpu_power
- For temperature:
https://www.tunabellysoftware.com/tgpro/ - CPU history graph, Apple Activity Monitor
We used multiple scenes with a specific pass limit. We measured the time required for each rendering from start to finish. During the rendering, we monitored the CPU (history, temperatures, frequencies).
The Macbook was always connected to the power supply.
The observations: Test 1:When we started rendering on a cold machine (subjectively “cool” ambient temperature in the office), it took 10 minutes for the CPU to underclock from the initial 3228 MHz to 2285 MHz on all cores.
On the second run in identical conditions, it took only 5 minutes for the CPU to underclock.
If the CPU frequency stays higher for a longer time during the first run, and it underclocks faster in each subsequent run, thermal throttling is the only sensible explanation.
We also repeated the test with V-Ray instead of Corona and the results were similar.
Test 2:(the test was performed using the same machine and tools, but by a different person on a different date and using different scenes)
“Low power” off:
At the beginning, the CPU hovers around 780% CPU usage in Apple's Activity Monitor. Once the CPU reaches about 90°C (it took 4 min 30s) it underclocks and the CPU usage drops to about 670% +- 20%.
“Low power” on:
The CPU % was about 710% the whole time, which made the render faster because it never underclocked/throttled.
The test was repeated a few times and the performance with low power turned off was always very similar. First 4 minutes and about 30 seconds the CPU performs well and in the process heats up to about 90°C, after that, it underclocks and the performance of the CPU is throttled until the remainder of the render time.
In low power mode, the CPU reached temperatures of about 80°C and 86°C max which caused the CPU to not throttle as much as it did with low power mode turned off. This means that if the render is long enough to render on a mostly throttled CPU, it will render faster in low power mode.
The same happens in V-Ray. Short render with cold CPU and low power mode turned off = 8 minutes 54 seconds
Short render with cold CPU and low power mode turned on = 8 minutes 59 seconds
(difference: 0,9%)
Longer render with cold CPU and low power mode turned off = 22 minutes 10 seconds
Longer render with cold CPU and low power mode turned on = 20 minutes 16 seconds
(difference: 9,37%)
Renders that took longer than a few minutes were always slightly faster with low power turned on and it was always due to CPU throttling after a few minutes.
Conclusions: We are able to reproduce the main reported issue:
- With “low power” on, the rendering performance is better (lower render times) and consistent during the whole rendering process. Less heat is produced and the CPU temperature stays lower during the whole rendering process.
- With “low power” off, the rendering performance is worse (higher render times) because the rendering process starts with the expected performance, and later the CPU is underclocked. More heat is produced and this results in higher CPU temperatures.
- The specific numbers from our tests are shared in the Observations section.
- The issue does not occur on an Ma1 Mac Mini, however it has a CPU with less cores (and possibly better air flow).
As software developers, we have no control over the underclocking which is done by the system. We cannot control it in any way.
We cannot really provide a full technical explanation why exactly the issue appears because M1 CPUs are too new and there is not much information and experience on how exactly they work (e.g. the issue appears only in M1 macBook, but not in macMini (which has less cores)). We don't yet know what is the state for the new M2 (we would like to find out soon).
Based on our tests and experience, we can say that
Corona and V-Ray (they are similar considering the CPU instructions and memory access patterns) can utilize CPU more than other commonly used software. This causes CPU overheating, and in turn leads to CPU underclocking. Similar issues were reported by AMD Threadripper 2990wx users when the CPU first became available. They would report the screen becoming black and requiring a system reboot, the system rebooting on its own, and other issues and blamed Corona for this. The solution was to make sure that the CPU is not overheating (e.g. because of an inefficient CPU fan), that the right motherboard model was picked for this CPU type, that the PSU is powerful enough, etc. They were always hardware problems, and fixing them resulted in problem-free rendering with exactly the same software (OS, host app, Corona version). The issues usually happened during the denoising stage, which engages specific CPU instructions, which is very demanding to the CPU (but again, the software is not doing “too much” considering the CPU capabilities - the system should be assembled in a way to handle such CPU usage without issues).
If the hardware is built properly, then Corona rendering cannot cause overheating and/or CPU throttling, system reboots, random shutdowns, bluescreens, or similar issues. If the CPU is reaching thermal limits, this is not the fault of the software (same with voltage / power limits / power throttling / VRMs, etc).
Suggestions:- We encourage you to retry our tests on your own and share your results:
1) In your case, does the CPU throttling appear with a delay the first time you start your “cold” Macbook, and then it starts happening faster when you retry the tests later on a “hot” Macbook?
2) Does the issue also appear in V-Ray for you?
- You can switch to other types of computers (desktop, Mac mini, etc - it is likely that they have better thermal design)
- You can switch to Windows OS (we are not getting reports about throttling from Windows users and Windows PCs are easier to customize in terms of hardware and software)
- You can use other rendering software than Corona (if the throttling does not appear when using it; according to our tests it happens in V-Ray too)
Other notes:- “Only Corona has this issue” - this is not true. This is not a Corona-only issue. According to our tests, the same issue appears when rendering with V-Ray.
- “What I see is that the dev team does not have a macbook machine to teste at, they probably have an mac mini m1 and that's all they call for.” - We used a MacBook Pro 16 inch 2021 (Apple M1 Pro with 10-core CPU, 16-core GPU, 16-core Neural Engine) for our tests, and also compared it with an M1 Mac Mini.
- What exactly do the red squares represent in the graph? In V-Ray there is much more of it than in Corona. - It means how much of CPU power is spent for system tasks (kernel space) vs how much of CPU time is spent for application tasks (green squares - user space).
- The M1 CPUs are still quite new and they may be confusing to users. For example:
https://eclecticlight.co/2022/02/24/cpu-percentage-is-misleading-on-m1-macs/ - M1 CPUs are known to throttle in some cases, for example when an external monitor is connected, or when the GPU is under heavy load. Most likely this is related to either thermal limits or power limits:
CPU throttling when GPU under load:
https://www.reddit.com/r/macbookpro/comments/q7x8zr/cpu_throttling_with_gpu_active/ "This isn’t thermal throttling of CPU or GPU. It’s VRM power throttling. Essentially, the VRM chips cannot sustain more than 60W of power for more than 10-15 mins. It’s a terrible problem."
https://forums.macrumors.com/threads/2019-16-is-hot-noisy-with-an-external-monitor.2211747/page-213?post=30336806#post-30336806"VRM power throttling -> This is the main issue with the 16" MBP due to no cooling mechanism on VRM chips. This is why we actually face the severe performance drop/throttling even on a cleaned 16" MBP."Images / screenshots: [link]