2

Let us assume that I work in a company and this company possesses just one server. At the end of every month my boss enters my office and asks me: 'Do we need new CPUs?'. Let us also say that, as a rule of thumb, the company needs new CPUs if more than 70% of the 'systems resources' are used. When typing lscpu I get

fabi@alien-linux:~$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
...

So I compute

X = (Nr of CPUs)*(Nr of sockets)*(Nr of cores per socket)*(Threads per core)

which is 84 in my case. For simplicity, lets assume that I execute "top" at a very high sampling rate throughout the month and it constantly shows

 50.0 50.0 50.0

which means that, in average, 50 processes were either actually dealt with by the cores, waiting to be dealt with or in the state "UNINTERRUPTABLE". Fine, I compute

0.7 * 84 = 58.8

so this means '70% of the systems resources = 58.8 processes'.

Since I only have 50 processes, I can answer 'no' to my boss, we do not need new hardware.

Here is my question:

Is this correct?

The question has been asked here and the answer was that this computation is not correct. I do not understand why...

best regards,

FW

fixer1234
  • 28,064

0 Answers0