AFAIK, the theory says multiply factor of 1 per CPU core to find out your optimal load average. So, server with 8 CPU cores optimal load average would be 8, 16 cores = 16 and so on. However, when using Imagemagick's mogrify I can see huge load average numbers:
top - 14:00:44 up 9 days, 20:12, 6 users, load average: 130.37, 87.53, 56.94
Tasks: 588 total, 11 running, 577 sleeping, 0 stopped, 0 zombie
Cpu(s): 99.8%us, 0.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 49555072k total, 33129928k used, 16425144k free, 3813092k buffers
Swap: 23438824k total, 47276k used, 23391548k free, 26145156k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29490 user1 20 0 121m 33m 2728 R 240 0.1 9:10.52 mogrify
29337 user1 20 0 121m 33m 2728 R 234 0.1 12:01.94 mogrify
29882 user1 20 0 121m 33m 2728 R 231 0.1 3:57.54 mogrify
29232 user1 20 0 121m 33m 2728 R 223 0.1 11:34.54 mogrify
29514 user1 20 0 122m 33m 2728 R 223 0.1 9:22.84 mogrify
29689 user1 20 0 121m 33m 2728 R 219 0.1 7:28.18 mogrify
29204 user1 20 0 121m 33m 2728 R 206 0.1 12:21.33 mogrify
As it is clear from top
- no issues with the server. This behavior occurs only when call mogrify
.
Why does it happen? How I can fix it or at least tune down a bit?
Thanks!
Edit: Usually they run that long. The server is responsive as usual. I am processing 618 images on average size 2.5 MB. The load is spread between few servers, which top
outputs look very identical. I have read this thread which I am yet to test. Seems to me that mogrify (or Imagemagick) "overestimate" the CPUs. Hence the 200+% CPU usage per job.