PyCharm uses 100% of 4 cores when run my application on its built-in terminal

Hello,

I'm using PyCharm 2018.3, on my Ubuntu 18.04.02 with a snap install, everything is good, all plugins up to date, from PyCharm and Ubuntu.

When I run my application on the Ubuntu terminal, there is no lack or exorbitant use of CPU, but as I want to use the fewer number of windows possible on my machine (I'm trying to use the PyCharm built-in terminal) each time I run the same application on PyCharm terminal it goes on 100% CPU usage (sometimes on one of the CPU cores more than 100% I don't even know how this is possible), like for at least the first 10 minutes, then decrease a little for one or 2 of the CPU cores (becomes between 70% and 95% for 1 or 2 cores of the 4 cores available).

I did some searches on the internet hoping to find that's the new version causing this, but no buddy is talking about this issue.

Help, please.

 

2
12 comments

Hi,

PyCharm's terminal should not cause any overhead in terms of CPU usage (aside from the normal CPU usage my the IDE).

Do you get CPU spikes when running the code using the run configuration (not in the terminal)?

Can you provide a code example that you run when the issue is reproduced?

0

Hi,

Actually, I don't have a run configuration as it's a GCP application run with the GCP dev_appserver.py script (must run via a terminal) and the application is an instance of Polymer front and a Webapp2 python back microservice.

And I asked the question here because running the application using Ubuntu terminal won't cause CPU spikes. If you want logs of running this, please send me the link to the how to procedure.

 

Thanks.

0

Hi,

Please create CPU snapshot according to the following article: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems.

Also, gather IDE logs according to https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files (immediately after reproducing the issue).

Please zip/tar all files, upload them to our FTP at https://uploads.services.jetbrains.com/ , and let me know the file name.

0

Hi Andrey, I have exactly the same issue, running almost any simple code (let's say print first 12 non-prime numbers) causes 100% CPU load until I press Stop Console button.

I uploaded a file with snapshots pycharm_100_cpu_terminal.zip

 

Thank you

0

@Ademin

I don't see any spikes in your CPU snapshot. Did you reproduce the problem while recording it?

When you run your code from the system terminal, do you get similar CPU load spikes?

0

This issue is back again in 2020.2.2

Open an empty Python file, type the number 1, watch 8 cores burn at 100% CPU for 30 seconds

Tried to load a script with 100 lines on my 64 core machine but it got maxxed CPU trying to do code highlighting, haha.

3

>Open an empty Python file, type the number 1, watch 8 cores burn at 100% CPU for 30 seconds

Does it happen even when no indexing is running in the background? We would appreciate if you report a performance issue to https://youtrack.jetbrains.com/ with CPU snapshot according to https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

0

It happens always, I made the CPU profile and created a ticket.

2

Thijs can you write here what response you get? I have the exact problem like you. Just highlighting the code uses 100% CPU.

0

They asked for CPU logs, now they ask for application logs. The latest version still has this bug.

PyCharm 2020.2.3 (Professional Edition)
Build #PY-202.7660.27, built on October 6, 2020

My ticket is here: https://youtrack.jetbrains.com/issue/PY-44734

0

I noticed the same issue with existing projects that used to be handled normally by PyCharm.

I also noticed the memory usage is increasing on all instance of PyCharm I have open until it reaches a point where some kind of garbage collection takes place. After the garbage collection, the memory usage is back to ~400 MB and the vicious cycle starts over. It goes from ~400 MB to ~4 GB within less than a minute...

When I say memory I mean the metric in the Memory Indicator (see screenshot).

I also noticed that this doesn't happen when I have a single instance of PyCharm open. It always happens when I have 4 instances open though (using New Window in the Open dialog).

0

Dimitris Kadoglou

Most of the time, the cases are unique, so could you please submit a performance problem report to https://youtrack.jetbrains.com/ with data from https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems ?

0

Please sign in to leave a comment.