Best Apache Configuration

Hi I have a VPS Linux server with RAM of 768Mb and My website is based on WordPress,which has over 50000 pageviews/day,In Recent times I got severe server overloading problem and came to know that Apache uses most memory,So if anybody could suggest me optimal Apache configuration

My current configuration is

StartServers 5

MinSpareServers 5

MaxSpareServers 10

MaxClients 30

MaxRequestsPerChild 0

see this memory usage stats img.freecircuits.org/images/screenoso.png and screenshot https://stats4.linode.com/generate_grap … thly&ver=2">https://stats4.linode.com/generate_graph.pl?linode=linode194483&username=vividvilla&graph=cpu&span=monthly&ver=2

2 Replies

My recommendation would be to reduce your MaxClients value significantly - perhaps around 10, and put nginx in front as a reverse proxy to handle static requests.

Lets say those 50,000 hits are all local, so they occur in a 8hr period.

That's a whopping 1.73 hits per second. If it's spread over multiple timezones then it's just 0.6 hits per second.

Unless your pages are HUGE, I don't think you have to do much of anything to handle that type of traffic.

Just lower max clients, tune your mysql setup, tune your php setup and you should be fine.

If you happen to grow to 200 times that traffic, perhpas this article will help:

http://www.ewanleith.com/blog/900/10-mi … -15-server">http://www.ewanleith.com/blog/900/10-million-hits-a-day-with-wordpress-using-a-15-server

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct