The server works on the debian gnu / linux distribution kit 7. I start video file conversion via ffmpeg 400 mb in size from avi format to mp4. The command is the simplest, without additional parameters:

$ ffmpeg -i pathInput -f mp4 pathOutput 

I decided to watch the use of server resources with the top command. Here is the information received on the ffmpeg process

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 55291 admin 20 0 379m 120m 5484 S 378.5 0.2 17:08.12 ffmpeg 

If I'm not mistaken, according to this data, 378.5% of CPU is used.

How can it be? Am I interpreting these values ​​incorrectly?

  • one
    You probably have 4 cores? - VladD 8:49 pm
  • (And in general, offtopic. How many resources specifically it uses depends on the processor's power.) - VladD
  • Yes, the processor has 4 cores, and if I looked right, the frequency is 3.1 GHz. So this percentage is formed as a result of adding the load on each core? - Roman Maltsev
  • one
    Yeah, just like that. - VladD

1 answer 1

The number in the %cpu column (percentage of processor usage) is summed over all cores (real or virtual) of all processors.

in this case, the number 378.5 says most likely that four cores are used almost one hundred percent.


By the way, the top program has the ability to show (in the upper, “header” part of the “window” of the program) not only the total load on all cores of all processors, but also on each core separately. This mode is switched by pressing button 1 .

example output for all cores:

 top - 18:17:10 up 11 days, 13 min, 19 users, load average: 0.11, 0.25, 0.25 Tasks: 203 total, 1 running, 202 sleeping, 0 stopped, 0 zombie %Cpu(s): 1.9 us, 0.5 sy, 0.0 ni, 95.8 id, 1.8 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 8218532 total, 3391900 used, 4826632 free, 468744 buffers KiB Swap: 2719740 total, 0 used, 2719740 free, 1168472 cached 

example output for each core separately:

 top - 18:17:17 up 11 days, 13 min, 19 users, load average: 0.09, 0.24, 0.25 Tasks: 203 total, 1 running, 202 sleeping, 0 stopped, 0 zombie %Cpu0 : 1.6 us, 1.6 sy, 0.0 ni, 96.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st %Cpu3 : 0.8 us, 0.8 sy, 0.0 ni, 98.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 8218532 total, 3409680 used, 4808852 free, 468744 buffers KiB Swap: 2719740 total, 0 used, 2719740 free, 1190592 cached