Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17761

Apache performance tuning?

$
0
0

I noticed a lot of httpd processes on my VPS and it appears that the default configuration is not that optimal. When I still had 1 GB ram my vps became unbearably slow at 87 simultaneous connections.

VPS info:

  • OS: DirectAdmin/CentOS
  • Ram: 2GB
  • Ram usage: 200 MB free / 800 mb available (MySQL has default config, uses about 25%)
  • Cores: 2 fast cores (max 29% cpu suage)
  • Usage: 6 Wordpress websites, 1 has peaks of 20.000 visitors per day @ google analytics (so even more server side). It is normal to have 20-90 active users according to analytics realtime tracking.

After some digging around I think I found the configuration file in /etc/httpd/conf/extra/httpd-mpm.conf

<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 450 MaxRequestWorkers 450 MaxConnectionsPerChild 10000 </IfModule> 

Now I found a lot of "guides" on the internet but most are aimed at using 500MB droplets. Since I have 2 GB I am not afraid to use some more memory.

So I end up with 2 questions

1) I do not have "max clients" in there... Can I add it manually or am I in the wrong configuration file?! 2) Is there anyone more experienced then me that can ballpark a good setting for a DirectAdmin CentOS setup like I have? I am pretty sure 450 is too high at 30MB per httpd process...

<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 ServerLimit 50 MaxRequestWorkers 50 MaxConnectionsPerChild 10000 </IfModule> 

I am guessing I need to use something like this (1500 MB/30= max 50 clients). But I am unsure about the maxconnectionsperchild.

submitted by MagistarNL
[link][4 comments]

Viewing all articles
Browse latest Browse all 17761

Trending Articles