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

Re: [linux] Apache et performances



Date: Thu, 27 Sep 2001 08:53:02 GMT
From: Hugues Mertens <linux.team@sangneuf.net>

> Serait-il possible que quelqu'un m'explique comment se comporte Apache
> lorsque 250 personnes décident de surfer en même temps sur mon serveur ?
> Quelles doivent être les caractéristiques d'un telle machine pour supporter
> une telle charge ?
> Qu'est-ce qui détermine la taille en mémoire du process httpd ?
> Pourquoi quand je fais un "top" la taille du process n'est pas la même que
> lorsque je regarde la taille lors d'un "ps -aux | grep httpd" ?
> A partir de quel moment un nouveau process httpd sera lancé ?

Un  petit tour  dans  le  fichier de  configuration  d'Apache qui  est
très bien  documenté. Je ne t'envoie QUE  les parties concernant
la question.  En ce qui concerne  la taille des process,  je crois que
cela  doit  peut-être  dépendre  des modules  chargés  (perl,
rewrite, jk, ...)  par Apache. La création de  nouveaux process (et
leur   mort)  est   décrite  dans   le  fichier   de  configuration
ci-dessous. 

Il vaut mieux aussi supprimer les  modules dont tu n'as pas besoin (je
crois qu'ils  ne sont  chargés QUE quand  Apache en a  besoin, mais
bon),  tu peux  aussi configurer  les  logs pour  qu'ils soient  moins
précis (ils prennent donc aussi  moins de place et demande moins de
temps à être écrits)...

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# Server-pool size regulation.  Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
#
# It does this by periodically checking how many servers are waiting
# for a request.  If there are fewer than MinSpareServers, it creates
# a new spare.  If there are more than MaxSpareServers, some of the
# spares die off.  The default values are probably OK for most sites.
#
MinSpareServers 5
MaxSpareServers 10

#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 5

#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
MaxClients 100

#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.  The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources.  On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For these platforms, set to something like 10000
# or so; a setting of 0 means unlimited.
#
# NOTE: This value does not include keepalive requests after the initial
#       request per connection. For example, if a child process handles
#       an initial request and 10 subsequent "keptalive" requests, it
#       would only count as 1 request towards this limit.
#
MaxRequestsPerChild 100


-- Arnaud, STE-Formations Informatiques, fapse, ULg, .BE

[ Soyez précis dans vos sujets svp afin de déterminer directement  ]
[ le type de demande...                                            ]
[ Pour vous (dés)inscrire, aller sur http://unixtech.be/ml.php     ]
[ Archives de la mailing list: http://archives.unixtech.be/linux/  ]
[ http://unixtech.be              Contact: listmaster@unixtech.be  ]