RE: Apache 2.x configuration for high load servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for all your help... first off I increased MaxRequestsPerChild from
1500 to 10000 on one webserver, just as a test to make sure all is good....

As for KeepAlive, we were told we cannot use it due to we are also using
keepalived on our haproxy load balancer, is this true?? As we have a bunch
of SSL certs

I already had ServerToken set to prod :)

I am not sure about UseCanonicalName On, as from what I read it might break
our rewrite rules we use them alott

So I commneted out mod_dir and Apache would not start I got this error, so I
put it back..

Starting httpd: Syntax error on line 22 of /etc/httpd/conf.d/php.conf:
Invalid command 'DirectoryIndex', perhaps misspelled or defined by a module
not included in the server configuration

I will disable atime later on this morning, I will mod fstab and reboot one
server at a time... the load balancer will autoamtiocally remoe that server
form the cluster when its down so ti will not affect any clients.. :)

I will read up more on mod_file_cache

Thanks again...

Rob Morin
Systems Administrator
Infinity Labs Inc.
(514) 387-0638 Ext: 207




-----Original Message-----
From: Geoff Millikan [mailto:gmillikan@xxxxxxxxxxxxx] 
Sent: Friday, May 27, 2011 3:35 AM
To: users@xxxxxxxxxxxxxxxx
Subject: RE:  Apache 2.x configuration for high load servers

#Increase this number.  The zombies you're seeing 
#is every time an Apache child process dies.
#The child will die @1500.  We run at 20000 and are having no problems.
MaxRequestsPerChild   1500

#We don't run as hot as you (we average 3 hits/sec and max at like 15 
#in a 24 hour period) but here's our settings:
StartServers	70
MinSpareServers	70
ServerLimit		364
MaxClients		364
MaxRequestsPerChild  20000

#Shrink the size of the response header:
ServerTokens Prod

#Defiantly want keepalive on, it will help page load time for customers.
#Everything else looks good.
Keepalive is on

#We have this turned on but we use server side includes SSI and we cache.
UseCanonicalName On

You have way too many modules enabled.  You need user_dir module?  Every
module loaded takes up RAM.  You should be able to get the
"RES" RAM use per process down to under 20 MB unless you're doing something
funky.

If you're finding that 80% of the time you're running 100 processes, then
start that many and keep that many going.  We found that
the process that starts up new children takes too long and it was causing
pages to hang while Apache started up new children.   So
just start as many as you need, even if a lot of them are just idle.

Couple of other tips:  

1. Turn off the "access time" atime on your file system.  This will speed
disk access a lot.

2. Using mod_file_cache on a big site is hard to get everyone on board for.
It's complicated and it's easy to cache the wrong
stuff.  However, with a bit of pain, there is a lot of gain to be had there
in terms of reduced work load on the server and thus
faster page load times.  Suggest you bite the bullet and do it.  BTW, the
CentOS rpm of Apache doesn't work with mod_file_Cahce.
Lots of bugs.  So have to compile from source on this.  We're on CentOS 5
too.

Lots of people will suggest the Worker MPM due to it's lower RAM usage
however we haven't done it as the PHP web site speaks so
strongly against it.

Best,

Geoff Millikan @ http://www.t1shopper.com/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux