LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   [Solved] High load web server (https://www.linuxquestions.org/questions/linux-server-73/%5Bsolved%5D-high-load-web-server-4175496941/)

imadsani 03-03-2014 10:39 PM

[Solved] High load web server
 
Me again,

I'm running a news publishing system on an octacore amd server with 24GB ram. PHP seems to be running every core to the full. I need to know whether I can bring this load down. I know the question may seem desperate and stupid but I can't upgrade the server at least for the next couple of days.


I'm attaching the htop screenshot

http://i1196.photobucket.com/albums/...pse75ee404.png

Here's the prefork MPM portion of httpd.conf
Code:


<IfModule prefork.c>
StartServers      8
MinSpareServers    5
MaxSpareServers  20
ServerLimit      256
MaxClients      256
MaxRequestsPerChild 0
</IfModule>


Here's the fcgid.conf
Code:

  FcgidIdleTimeout 60
  FcgidProcessLifeTime 30
  FcgidMaxProcesses 256
  FcgidMaxProcessesPerClass 20
  FcgidMinProcessesPerClass 0
  FcgidConnectTimeout 30
  FcgidIOTimeout 45
  FcgidInitialEnv RAILS_ENV production
  FcgidIdleScanInterval 10


Server specs:
AMD Octacore
24GB RAM
2TB HDD
CentOS 6.5
Plesk 11.5

pantdk 03-03-2014 11:55 PM

1) might required application fine tune apache
2) check the i/o (service time & utilization on disk iostat -kdx)
3) it's virtual server or physical then need to set the elevator to fine tune the kernel
3) if possible to install the oswatcher which can give you the most valuable logs to analysis

imadsani 03-04-2014 12:18 AM

Thank you for the feedback, I'll look into this.

scarleo 03-04-2014 01:40 AM

Try xcache or APC, if you are serving web pages and that is what is causing the load try to put varnish in front of it. With that spec you should be able to serve obscene amounts of requests.

imadsani 03-04-2014 01:42 AM

Quote:

Originally Posted by scarleo (Post 5128542)
Try xcache or APC, if you are serving web pages and that is what is causing the load try to put varnish in front of it. With that spec you should be able to serve obscene amounts of requests.

Yes, its for web pages and yes there is no cache being used currently. We're rushing cache implementation for this.

imadsani 03-04-2014 12:43 PM

This has been solved.

Updated the application to use memcached and now the server cores are idling between 2-5% each, with more traffic than before.

Thank you all for your valuable input.


All times are GMT -5. The time now is 08:52 AM.