I have run several (n
) Jupyter notebooks in parallel. As they use FEniCS, each has spawned a number (much more than m - 1
) of threads (PIDs) which can occupy all available cores (m
). Now I have much more than m * n
threads (of at least n
processes) which compete for resources (cores, RAM etc.). That significantly damps their performance.
As I need results of some of the notebooks more urgently the of the others, I would like to set priorities of their PIDs accordingly (renice
them). Sadly I have no idea which PIDs belongs to which notebook. How can I verify that without interrupting the notebooks?
I know I can stop all my notebooks but one (the least important), use htop
to renice
the processes which still use CPU, then run the other notebooks one by one and repeat the procedure. But is there a way to do it while all the notebooks are running?