Portal Home > Knowledgebase > Articles Database > How to Optimize Apache?? Please Help


How to Optimize Apache?? Please Help




Posted by luckydost, 07-14-2008, 10:43 PM
Hello Friends, I have purchased "Due2Core" with 4GB Ram. i have one problem. i hope someone help me in this matter. I have hosted only 4 or 5 websites on dedicated. mostly maximum 8000 users visit my website. Maximum B/W usage is 35GB. Daily 25 or 30 mints my websites "WebPages open speed slow". Some time problem occur for 1 time or 2 times. when i checked my server status report Load only 0.50% and Memory usage 35% only. when i checked server and my sql usage report maximum http load come from my top visit websites. some friend suggest me for optimize your dedicated apache. because some thing wrong in your apache. because i have enough memory. Anybody suggest me suitable apache Optimization method. with step by step. Remember, in this time my server run default sitting. Please help me...!

Posted by The Universes, 07-14-2008, 11:25 PM
How many concurrent connections are you getting during peak load? You may need to increase the MaxClients and ServerLimit values. Also, unload any unused apache modules. If your looking for something to fix this problem long term, I'd recommend considering Lighttpd, its far better at handling large numbers of concurrent connections.

Posted by luckydost, 07-14-2008, 11:52 PM
First Thanks For Reply..! Dear Maximum 80 OR 90 connections at one time. i have purchased following Dedicated. * CPU - Core2Duo 6550 * Memory - 4GB RAM * Hard Disk Space - 400GB HDD * 100Mbit port - full duplex in this time default setting running. i went to connect maximum visitor with my websites without any slow speed. Please Suggest me how i can fix this??? And How i can install Lighttpd??? Please Dear...! Main Issue is slow speed of web pages opening. when i login in WHM its working fastly. Remember in this issue Apache Server involve.

Posted by anoopadmin, 07-15-2008, 02:15 AM
Please provide the following values in your apache configuration KeepAlive MaxKeepAliveRequests KeepAliveTimeout MinSpareServers MaxSpareServers StartServers MaxClients MaxRequestsPerChild Lighttpd is not support by cPanel, you need to install it manually. You can find the tutorial @ http://www.webhostingtalk.com/showth...tall+litespeed Last edited by anoopadmin; 07-15-2008 at 02:26 AM.

Posted by luckydost, 07-15-2008, 03:10 AM
where is file? i have checked on /etc/apache2/apache2.conf Or /etc/apache1/apache1.conf place but no file located here. Please tell me how i can find. in this time default setting running. Yes i have Cpanel On Dedicated. What you suggest for me??? Lite Speed??

Posted by luckydost, 07-15-2008, 03:28 AM
Yes I have Found By Typing this>> sudo nano /etc/httpd/conf/httpd.conf After this i have found these setting include "/usr/local/apache/conf/php.conf KeepAlive =On MaxKeepAliveRequests =100 KeepAliveTimeout =100 MinSpareServers=5 StartServers =5 MaxClients = 150 MaxRequestsPerChild =0 What you suggest me??

Posted by Orien, 07-15-2008, 03:35 AM
KeepAliveTimeout is WAY too large. Change it to 5 or lower.

Posted by luckydost, 07-15-2008, 04:20 AM
Ok, i have changed "KeepAliveTimeout 5". it's effect on my websites load problem??? Lite Speed will Control my Apache load???

Posted by pcigre, 07-15-2008, 08:00 AM
Are 90-110 process too much for 512mb ram vps?

Posted by luckydost, 07-15-2008, 10:25 AM
i have updated httpd.conf file as. ==================== KeepAlive =On MaxKeepAliveRequests =2 KeepAliveTimeout =4 MinSpareServers =10 StartServers =20 MaxClients = 200 MaxRequestsPerChild =300 ==================== Please Tell me it's fine?? i have Due2Core 6550 with 4GB Ram 100 Port. Maximum Visitor 8000

Posted by datums, 07-15-2008, 10:43 AM
Is it still running slow? You can optimize apache or go with nginx. If you don't know how to optimize apache I suggest you hire someone who does.

Posted by luckydost, 07-15-2008, 12:02 PM
Yess some time Hosted websites on Dedicated running slow. i went to fix http server. Decause server show normal load like 0.50% or memory load 35%. Please tell me how i an fix this issue and my http server working fast and safe.

Posted by The Universes, 07-15-2008, 12:25 PM
MaxKeepAliveRequest is way too low, I would increase it to at least 50 if not 100 and increase KeepAliveTimeOut to 10. Otherwise, just turn KeepAlive Off. Increase your MaxClients and ServerLimit setting by 50-100 (equally for both) and see if that helps any. I also would increase MaxRequestsPerChild to 5000, right now its really low and causes Apache to respawn far too often. What is your MaxSpareServers, and ServerLimit set to at the moment?

Posted by luckydost, 07-15-2008, 01:52 PM
MaxSpareServers = 20. Where "ServerLimit set to at the moment"??? Thanks For Advise. I have hosted Wordpress Or Mp3 Based websites. You sure??? following setting suitable for my Dedicated Server????



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Backup Script (Views: 707)
Experience With....... (Views: 655)