Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jul 31, 2011 12:08 pm 
Offline
Newbie

Joined: Sun Jul 31, 2011 12:02 pm
Posts: 4
Website: http://devcha.com
Location: Canada
Hello,

Can you recommend me settings for apache 2's MaxClients Fedora core14 768mb linode vps

This is what I had when I used 512MB linode. Now it is 768.
Can I still keep those settings or can they be improved ?

NEW
<IfModule prefork.c>
StartServers 2
MinSpareServers 3
MaxSpareServers 6
ServerLimit 30
MaxClients 30
MaxRequestsPerChild 4000
</IfModule>

OLD

<IfModule prefork.c>
StartServers 1
MinSpareServers 3
MaxSpareServers 6
ServerLimit 24
MaxClients 24
MaxRequestsPerChild 3000
</IfModule>


I found a formula but I am not sure about: size_all_other_processes
http://www.devside.net/articles/apache- ... nce-tuning

MaxClients ≈ (RAM - size_all_other_processes)/(size_apache_process)


[root@rex aaaaa]# free -m
total used free shared buffers cached
Mem: 750 405 345 0 19 172
-/+ buffers/cache: 212 538
Swap: 511 0 511


[root@rex xxx]# ps -ylC httpd --sort:rss
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 48 2273 1850 0 80 0 9376 9142 - ? 00:00:00 httpd
S 48 2309 1850 0 80 0 9376 9142 - ? 00:00:00 httpd
S 48 2268 1850 0 80 0 9388 9142 - ? 00:00:00 httpd
S 48 2272 1850 0 80 0 9388 9142 - ? 00:00:00 httpd
S 48 2307 1850 0 80 0 9388 9142 - ? 00:00:00 httpd
S 48 2306 1850 0 80 0 9424 9142 - ? 00:00:00 httpd
S 48 2297 1850 0 80 0 9428 9142 - ? 00:00:00 httpd
S 48 2301 1850 0 80 0 9488 9153 - ? 00:00:00 httpd
S 48 2300 1850 0 80 0 9500 9153 - ? 00:00:00 httpd
S 48 2305 1850 0 80 0 9688 9151 - ? 00:00:00 httpd
S 48 2308 1850 0 80 0 9688 9151 - ? 00:00:00 httpd
S 0 1850 1 0 80 0 9808 8507 - ? 00:00:00 httpd
S 48 2265 1850 0 80 0 10128 9207 - ? 00:00:00 httpd
S 48 2263 1850 0 80 0 10140 9211 - ? 00:00:00 httpd
S 48 2274 1850 0 80 0 10140 9207 - ? 00:00:00 httpd
S 48 2227 1850 0 80 0 10280 9151 - ? 00:00:00 httpd
S 48 2296 1850 0 80 0 10352 9142 - ? 00:00:00 httpd
S 48 2161 1850 0 80 0 10404 9207 - ? 00:00:00 httpd
S 48 2256 1850 0 80 0 10876 9207 - ? 00:00:00 httpd
S 48 2261 1850 0 80 0 10896 9207 - ? 00:00:00 httpd
S 48 2271 1850 0 80 0 10916 9207 - ? 00:00:00 httpd
S 48 2253 1850 0 80 0 10972 9207 - ? 00:00:00 httpd
S 48 2276 1850 0 80 0 11028 9232 - ? 00:00:00 httpd
S 48 2243 1850 0 80 0 11272 9229 - ? 00:00:00 httpd
S 48 2172 1850 0 80 0 11308 9223 - ? 00:00:00 httpd
S 48 2262 1850 0 80 0 11748 9217 - ? 00:00:00 httpd
S 48 2240 1850 0 80 0 11980 9223 - ? 00:00:01 httpd
S 48 2179 1850 0 80 0 19580 10934 - ? 00:00:00 httpd
S 48 2298 1850 0 80 0 21040 13726 - ? 00:00:00 httpd
S 48 2275 1850 0 80 0 21528 13666 - ? 00:00:00 httpd
S 48 2201 1850 0 80 0 22576 13872 - ? 00:00:00 httpd

_________________
http://fbtab.net | http://devcha.com


Top
   
 Post subject:
PostPosted: Sun Jul 31, 2011 7:01 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Are there any particular reasons to increase MaxClients? If Apache hits the limit, it'll generally log something about it.

What's your application? What else is running on the box? Why did you decide to increase the amount of RAM in the first place?

It's tough to know if your settings are ideal for your situation without knowing what your situation is, alas.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 1:47 am 
Offline
Newbie

Joined: Sun Jul 31, 2011 12:02 pm
Posts: 4
Website: http://devcha.com
Location: Canada
Hi,

Thanks for the reply.

I didn't see anything unusual in the logs.

I increased the memory because the free memory got to 6mb (top cmd).
The CPU was under 3% though ?!?

I just put AWstats and will check what might be causing this.

I think it maybe some crawlers hitting the server at the same time.

What information do you need ?

_________________
http://fbtab.net | http://devcha.com


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 8:06 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
The number 'top' reports for free memory is misleading without doing some additional math; see linuxatemyram.com.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 11:17 am 
Offline
Newbie

Joined: Sun Jul 31, 2011 12:02 pm
Posts: 4
Website: http://devcha.com
Location: Canada
The box runs
- MySQL
- Apache -3-5 sites
- java/tomcat
- fail2ban

_________________
http://fbtab.net | http://devcha.com


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 3:41 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Tomcat will probably use a fair amount of memory on its own; you might also want to adjust MySQL to use more RAM (mysqltuner.pl is good at suggesting possible config changes). If you aren't hitting MaxClients, you might as well leave RAM for the subsystems that can take advantage of it. :-)

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Aug 01, 2011 6:13 pm 
Offline
Newbie

Joined: Sun Jul 31, 2011 12:02 pm
Posts: 4
Website: http://devcha.com
Location: Canada
I run the tuner and we'll see if there will be some improvements

_________________
http://fbtab.net | http://devcha.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group