Restrict core usages PyCharm

末鹿安然 提交于 2020-04-07 04:20:57

问题


I have this program that I've written in PyCharm. This program should be running for a week or so, and it is very processor-needy. So when I run it I pretty much have no use of my notebook, as it becomes very laggy.

Is there a way to somehow tell PyCharm to use first three of my cores and leave one for other programms so they can operate normally?


回答1:


  1. Go into task manager

  2. Find the running task (it probably won't be the main pycharm window)

  3. Right click and select "go to details"

  4. Right click on the details and click "set affinity"

  5. Select whatever cores you wish the program to use

Alternatively you can use the "set priority" sub-menu and set it to "below normal". All other processes are normal priority by default, so it shouldn't interfere with anything, but still use any other available processing power. You can do the same thing with long installations or automatic windows updates so they don't slow you down.

I should also note that both of these selections will be reset upon restarting the program. Additionally, if you are using windows 7, you don't need to "go to details". Everything will appear in the context menu for the process.

Unfortunately, I don't know how to do this in pycharm.



来源:https://stackoverflow.com/questions/29218697/restrict-core-usages-pycharm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!