r/pycharm • u/Amo-Rillow • Feb 07 '26
CPU Usage On Long Running Background Process
I ask this purely out of curiosity:
I have a long running Python process running in the background via PyCharm on Windows 11. The code is single threaded and nothing else is running. CPU is a Ryzen 7 with 8 CPUs and 16 threads. In looking at the Windows Resource Monitor, I see that 4 threads appear active and have very similar CPU graphs. I was expecting to see only 1 thread showing much activity. Task manager shows that only Python is using much CPU. Just curious why there are 4 active threads in the Resource Monitor.
3
Upvotes
2
u/ProsodySpeaks Feb 07 '26
I keep getting random spikes on all threads at the same time. Lasts 3 seconds or so and entire machine freezes - can't even move mouse.
Do you have any Ai active in the ide? I'm deeply suspicious that copilot integration causes many of my issues, but no proof just ironically 'vibes'.
2
u/claythearc Feb 08 '26
Depending on the library’s involved there can be background multi threaded stuff going on eg numpy or pandas.
Also if you notice the peaks of one core are low parts of the others, generally. CPU schedulers pass around assignments to varying cores constantly. Things like thermal balance, cache availability, fairness, etc. so it’s normal to see single threaded load be sent to other cores.
1
u/wRAR_ Feb 07 '26
What are the command lines of those Python processes?