Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use code to increase the CPU occupancy of MAC

Shulou Source: shulou.com Published: 2022-06-01 06:10:17 10月02日 Update

This article to share with you is about how to use the code to MAC CPU occupancy rate up, Xiaobian feel quite practical, so share to everyone to learn, I hope you can read this article after some gains, not much to say, follow Xiaobian to see it.

import multiprocessingimport hashlibdef thread_func(): while True: passif __name__ == "__main__": cpus = 4 t = [] for i in range(0,cpus): thread = multiprocessing.Process(target = thread_func) thread.start() print i t.append(thread) for i in range(0,cpus): t[i].join()

Of course, this thing is not enough, although the CPU utilization rate has been raised, but the MAC fan will run wildly, so it will feel noisy. Download a Macs Fan Control and change the fan control strategy to a fixed minimum.

If the firepower is not large enough, change the above cpus to a larger value, but this will make the system react slowly yo.

TIPS: Modern CPUs automatically reduce the frequency when the temperature is too high, so the computing speed will decrease at high temperatures.

The above is how to use the code to increase the CPU occupancy of MAC. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Usage rate code not enough more knowledge article fan practical minimum that is work meeting article time luck temperature firepower gadget look knowledge point Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei MySQL Linux vpn