# python dependencies sucking up system cpu time



## chrcol (Mar 17, 2019)

Every python dependency pauses for ages here.  With sys cpu usage maxing out a cpu core.

writing dependency_links to idna.egg-info/dependency_links.txt

```
Top 2 processes

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU COMMAND
13309 root          1 102    0   147M   142M CPU1    1   1:40  99.20% python2.7
77270 root          1  52    0  2932M   364M CPU3    3   0:56  52.64% git
```
If I kill the git process it proceeds instantly without errors.

Any ideas whats happening?


----------



## D-FENS (Mar 17, 2019)

Use "ps eww" to get more information about the cmd line those processes were invoked with.
Use "ps -T <pid>" to show the child processes of a pid.
htop will show you this information out of the box.

When you know what arguments python was invoked with, you could analyze the script and see what it does.
Most interesting is what argument does the git call have and what it does.

Here is some python debug help: https://docs.python.org/3/library/pdb.html

And you could use gstat and a disk activity logger to have some idea what is going on storagewise, but I can't help there at the moment.


----------



## chrcol (Mar 18, 2019)

Thanks, I can already confirm storage is idle from systat analysis. Will follow your advice and report back here with findings.


----------

