Forum Moderators: phranque

Message Too Old, No Replies

Tuning apache, kindly help with these settings

trying to tune apache, kindly suggest settings

         

JKumar

1:10 am on May 14, 2020 (gmt 0)

5+ Year Member



I am trying to tune my apache CPanel VPS for faster performance.
Sometimes in peak hours, it takes too long to even load a plain HTML page, which is not using PHP or mysql at all.
PHP scripts are also not taking over 1 second, very rarely one PHP script takes 2 seconds.
Still, sometimes apache becomes too slow in responding.

Can someone please explain how these settings will affect server performance?
My server info says that I got 3 CPU on my VPS. 2000 MHZ per CPU.


TimeOut 300
I changed to 60
Is this the value which PHP overwrites with its set_time_limit() setting?


maxKeepAliveRequest 100
I changed to 30
I don't load too many extra things when a webpage is loaded. 2-5 images, and 1 js file may be.

keepAliveTimeout 5
I changed to 3.
I think this keeps a connection open between browser and server per http load. Once browser stops requesting images/css/js etc, then this comes into effect, right? So once browser stops requesting images/css etc, then apache will wait 3 seconds and will terminate connection, right?


maxConnectionsPerChild 10,000 (10k)
Not sure what this does.
I think its max number of requests that 1 httpd process can process, right?
Should I increase this to 20,000 or is it ok?
What is the difference in same httpd process keeping on handling request after request, instead of starting new process after 10k requests are processed?


maxRequestWorkers 150
I changed to 300
Is this the max number of humans/bots opening http connection to my website? This is for 1 second or how long?
If I can increase this (on a 3 CPU VPS), then how high can I go safely?

serverLimit 256
I changed to 512

Maximum spare servers 10
Minimum is 5
Start servers is also 5

Again, no idea what these are doing...
Should I increase these or decrease these?


I would greatly appreciate if someone could tell me how these settings affect server performance.

I don't want to use small settings in these and waste idol server resources.

Many Thanks

tangor

2:08 am on May 14, 2020 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is this install on hardware you own, or is it located on a third party hardware?

Your delays, if on third party, may have NOTHING to do with your default settings.

JKumar

2:13 am on May 14, 2020 (gmt 0)

5+ Year Member



This is on a hostgator VPS. I started a support ticket with them on 4th May, but they still have not replied.
When I restart apache from root putty, then things start working fine for a while, but again same slowdown starts after an hour or so...

No5needinput

10:33 am on May 14, 2020 (gmt 0)

10+ Year Member Top Contributors Of The Month



Are you using a 3rd party firewall? My dedicated server was like that before I installed a very popular well known free firewall (sticky mail me for name - not affiliated) and the difference in speed performance was incredible.

JKumar

10:44 am on May 14, 2020 (gmt 0)

5+ Year Member



I am not sure which firewall is used on VPS. Hostgator installed everything including CPanel and other things. Please PM/mail me the name of the firewall you are using. I don't know how to send PM in this forum.

phranque

12:42 pm on May 14, 2020 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], JKumar!

(the welcome link will give you plenty of useful information about how WebmasterWorld works)

JKumar

3:00 pm on May 14, 2020 (gmt 0)

5+ Year Member



Thanks Phranque :)