please, help me to resolve the issue. I have an images processing website on the dedicated server. After moving to more powerful server I met strange problems.

First server configuration was:

Core 2 Quad 6600
2x500GB SATA + Hardware Raid0
Fedora 32bit + PAE

New server configuration is:

Core 2 Quad 6600
2x300GB SAS + Hardware Raid0
CentOS 64bit

engine uses Nginx + Apache + fastcgi + perl
Nginx - frontend, serves static content.
Apache - backend, serves dynamic content using fastcgi.

The reason why I had to upgrade server is high disk utilization, almost 90..100%
Now there is no problem with disk, but new problem arisen.
Now all fastcgi processes together use almost 100% CPU.

I also noticed, that process uses alot of CPU when website's user uploads large file to the server. And after file has been uploaded CPU usage becomes normal again.

Here are first rows from the top


18306 apache    15   0  427m  45m 5576 S 97.4  0.6   0:23.83 index.fcgi  
18294 apache    16   0  440m  58m 5312 S 68.8  0.7   0:22.81 index.fcgi  
17612 apache    16   0  465m  82m 5728 R 59.8  1.0   1:03.95 index.fcgi  
18164 apache    15   0  397m  79m 5628 S 40.9  1.0   0:35.59 index.fcgi  

I've never seen anything like that on the old server.
Do you have any ideas what can cause such problem ?
Let me know if you need some additional server info

Thanks in advance!


It is natural that when you remove one bottleneck (disk IO), the system will speed up to the point of hitting another bottleneck (in this case, apparently, CPU). You should improve the efficiency of your code (so that it utilises a single core better), parallelise your code (so that it can utilise multiple cores simultaneously), obtain better CPUs, or learn to live with it. Is your site running slower than is acceptable for your situation?

  • Thank you for the answer. The same code is running on the other similar website with no problems. Also, strange, that CPU usage rapidly increases only during uploading large files. Engine is parallel, using fastcgi I always have 30 copies of the index.fcgi in the memory ready for connections. And yes, website is almost inaccessible during high users traffic. – serzh Dec 19 '09 at 23:15
  • 1
    Not knowing anything about this other "similar website", there's so many reasons why there could be differences it'd be ludicrous to try and enumerate all the possibilities. Suffice it to say, something in your site code is chewing all the CPU. Profile it and hunt the problem down. – womble Dec 20 '09 at 7:28
  • For those who will meet the same problem. The reason of the low CPU performance was in ImageMagick. That somehow wrong uses openMP ( open multy-processing ) under CentOS. Compilation ImageMagick with --disable-openmp helps me! – serzh Dec 20 '09 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy