Optimizing Apache for 1,000,000 views per day

NICK VERBECK nerdynick at gmail.com
Mon Jul 7 22:16:25 UTC 2008


The big thing that will influence your config settings are what each
page view is doing. If you have a server that returns a lot of media
you will want to have a diffrent set of values but if you are doing
some massive PHP framework code then you will have another set of
values . The other big thing that will influence both of these sets of
values will be how much memory you have in the machine. The more you
have the more possible server threads you can run safely.

All in all you really can't have 1 server config to rule them all when
you start getting to those levels. You really have to start changing
settings to better soot what you are trying to do on each individual
server.

On Mon, Jul 7, 2008 at 3:15 PM, Brett Alton <brett.jr.alton at gmail.com> wrote:
> I've been working with Apache for a couple years now, but I've never
> ran into a high-profile enough website to worry about timeout,
> prefork, etc. settings.
>
> So I ask, how are the default Apache settings in Ubuntu/Debian for
> handling 1,000,000 views per day?
>
> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> <IfModule mpm_prefork_module>
>    StartServers          5
>    MinSpareServers       5
>    MaxSpareServers      10
>    MaxClients          150
>    MaxRequestsPerChild   0
> </IfModule>
> <IfModule mpm_worker_module>
>    StartServers          2
>    MaxClients          150
>    MinSpareThreads      25
>    MaxSpareThreads      75
>    ThreadsPerChild      25
>    MaxRequestsPerChild   0
> </IfModule>
>
> I remember seeing on Digg an interesting screenshot of 'top' when the
> Digg effect occured on a server
> (http://www.vgpro.com/media/97248c0ca8a6383bd4d699ee4feb0c5b.png).
>
> He or she never posted their .conf file, but their image says "What
> Digg.com does to servers hosting front page articles when the
> http.conf file is not configured correctly!! / MaxClients limit set
> too high - MaxRequestsPerChild too low!!"
>
> Now, I've never had a problem with Debian/Ubuntu and the default
> Apache configuration, and I assume this person isn't using
> Debian/Ubuntu because they stated 'httpd.conf' instead of
> 'apache2.conf', but I figured this would be a good discussion for this
> mail list.... go! =)
>
> --
> Brett Alton
> brett.jr.alton at gmail.com
>
> Do you really need to print this email? Help preserve our environment!
>
> --
> ubuntu-server mailing list
> ubuntu-server at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
> More info: https://wiki.ubuntu.com/ServerTeam
>



-- 
Nick Verbeck - NerdyNick
----------------------------------------------------
NerdyNick.com
NerdyNick.org
NerdyNick.net
SkeletalDesign.com
Dynamicticity.com




More information about the ubuntu-server mailing list