CPU and Memory Usage of Windows Is Too High When Running Python Programs Due to Windows Defender Antivirus Service Starting

Introduction: Enable the "Turn off Windwos defender" service to solve the problem of freezing of Alibaba Cloud Windows server, and list some wrong solutions on the Internet.

【running python programs due to Windows Defender Antivirus Service starting】foreword


In the past few days, due to the college's urge to supervise the health check-in situation in the class, I wrote a crawler to check and urge students in the class to check in healthily, and configured it on my own Alibaba Cloud Windows 10 server.
On the way to the server to check the work log of the crawler at noon the next day, it was found that the server was abnormally stuck.
First check the network connection, it shows that the signal is good, indicating that it is not the problem of the connection signal.
Then check the task manager and find that there is a system process that occupies a lot of cpu and system memory, making the overall cpu occupancy and system memory occupancy show
100% .

【running python programs due to Windows Defender Antivirus Service starting】solution process


1. Click the drop-down button, it is an anti-malware service executable that has been occupying the system process.

2. Try to close the service directly in the task manager, and find that the service fails to close.
3. Then enter the windows service community and find an article on how to disable Windows Defender Antivirus Service , which introduces two solutions.
4. I tried one of the methods
Windows+R to open Run, enter " gpedit.msc " and press Enter, open the policy group, navigate to "Computer Configuration > Administrative Templates > Windows Components > Windows Defender" in the policy group to
view the configuration of "Turn off Windwos defender", double-click it in the properties enable instead

After following the steps, the cpu and memory usage of the system windows has been restored.

【running python programs due to Windows Defender Antivirus Service starting】wrong way


1. Turn off real-time virus protection
. When Baidu queried the solution, there was a Baidu knowledge bar antimalware service executable that took up a lot of memory . After following the method, the occupation in the task manager still did not disappear. This method is invalid .
Operation steps:
1. Right-click the win10 start menu and select "Run" ( Win+R can also be used);
2. At the opening of Run, enter Gpedit.msc and press Enter (I believe everyone already knows that this is to open the local group 3. After opening the local group policy
, open it in turn: Computer Management->>Administrative Templates->>Windows Components->>Windows Defender;
4. Then open "Real-time Protection" and find "No matter what When the real-time protection is started, the process scan will be started.” This configuration item is set to “Disabled”, and then check whether the CPU usage improves;
  5. If the above settings cannot solve the problem of CPU usage, you can completely turn off Windows Defender, double-click the option to turn off Windows Defender and set it to "Enable".
This method is adopted by many netizens. For example, what is Antimalware Service Executable in csdn ? How to close , but can't prove it can't close.
2. Add the whitelist according to
the answer in the short book [Solving the problem of Antimalware Service Executable occupying CPU
] ( https://www.jianshu.com/p/adb5140fb361) , Antimalware Service Executable is caused by the python process , you can pass the white list List of ways to resolve. But the article pointed out that win10 will still start the program automatically. This is probably the reason why the real-time virus service is closed, but the Antimalware Service Executable process cannot be closed.


Copyright statement: The content of this article is contributed by Alibaba Cloud's real-name registered users. The copyright belongs to the original author. The Alibaba Cloud developer community does not own the copyright and does not assume the corresponding legal responsibility. For specific rules, please refer to the " Alibaba Cloud Developer Community User Service Agreement " and " Alibaba Cloud Developer Community Intellectual Property Protection Guidelines ". If you find any content suspected of plagiarism in this community, fill out the infringement complaint form to report it. Once verified, this community will delete the allegedly infringing content immediately.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00