0

I am trying to deploy a long task to a remote server. The remote server has 56 CPUs. I.e.

>>> import multiprocessing as m
>>> m.cpu_count()
56
>>> 

I have an option to specify how many CPUs I can use in my task, but sometimes the optimal choice is not the same as what we would have done in our own laptop (e.g. Use all CPUs or half of all CPUs), because there are many people having access to the remote server. Therefore, I am looking for a few lines of code that can give me the available computing power in each CPU, which may look like below:

CPU #1: 56%
CPU #2: 12%
...
CPU #56: 0.1%

Can someone tell me if it is possible to check the available computing power of each CPU so that I can make a better decision on how many CPUs I should use for my own task?

Thanks!

oguz ismail
  • 1
  • 16
  • 47
  • 69
Caprikuarius
  • 176
  • 7
  • Does this answer your question? [Total CPU usage - multicore system](https://stackoverflow.com/questions/36952812/total-cpu-usage-multicore-system) – Digvijay S Jun 18 '20 at 06:33
  • I am not sure, as I don't know if it reflects the usage of the entire server or just a snapshot of my usage. Currently it shows that the usage is pretty low, but my code runs very slowly on each core. Not sure if the reason is that many other users are competing for the resources or if the server has lower-level configuration than my laptop. – Caprikuarius Jun 18 '20 at 06:38

0 Answers0