MPM - connection

MPM - connection

am 14.01.2010 11:17:28 von Andrew Hole

--0015174a047ab14087047d1d31b1
Content-Type: text/plain; charset=ISO-8859-1

Hi!

I was reading an interesting document
http://httpd.apache.org/docs/2.0/misc/perf-tuning.html about MPM and I would
like to clarify a doubt regarding the concept of connection:
* The worker MPM uses multiple child processes with many threads each.
Each thread handles one connection at a time. Worker generally is a good
choice for high-traffic servers because it ha
s a smaller memory footprint than the prefork MPM.
* The prefork MPM uses multiple child processes with one thread each.
Each process handles one connection at a time. On many systems, prefork is
comparable in speed to worker, but it uses more memory. Prefork's threadless
design has advantages over worker in some situations: it can be used with
non-thread-safe third-party modules, and it is easier to debug on platforms
with poor thread debugging support.

What means "Each process/thread handles one connection at a time?" A
connection is a request made by the client? A thread just handle a request?

Thanks

Best Regards

--0015174a047ab14087047d1d31b1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi!

=A0

I was reading an interesting document rg/docs/2.0/misc/perf-tuning.html">http://httpd.apache.org/d ocs/2.0/misc/pe=
rf-tuning.html
about MPM and I would like to clarify a doubt regarding =
the concept of connection:


  =A0 *=A0 The worker MPM uses multiple child processes with many =
threads each. Each thread handles one connection at a time. Worker generall=
y is a good choice for high-traffic servers because it ha

s a smaller memory footprint than the prefork MPM.
  =A0 * The =
prefork MPM uses multiple child processes with one thread each. Each proces=
s handles one connection at a time. On many systems, prefork is comparable =
in speed to worker, but it uses more memory. Prefork's threadless desig=
n has advantages over worker in some situations: it can be used with non-th=
read-safe third-party modules, and it is easier to debug on platforms with =
poor thread debugging support.


What means "Each process/thread handles one connection at a time?&q=
uot; A connection is a request made by the client? A thread just handle a r=
equest?


Thanks


Best Regards



--0015174a047ab14087047d1d31b1--

Re: MPM - connection

am 14.01.2010 11:31:33 von Mark Watts

--=-pMgNuowW/Mg0ZjKpVMFl
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, 2010-01-14 at 10:17 +0000, Andrew Hole wrote:

> What means "Each process/thread handles one connection at a time?" A
> connection is a request made by the client? A thread just handle a
> request?

A client (web browser) makes a connection to the server, thus using up
one Prefork_MPM child process or one Worker_MPM worker thread.

The client then issues a GET/POST/HEAD request and waits for the
response. The client may be permitted to make more than one
GET/POST/HEAD request without disconnecting, if KeepAlive is turned on,
otherwise the connection is closed, releasing the server resources to be
reused for another client (assuming the child process/thread isn't
reaped at that time).

Mark.

--=20
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, Managed Services Manpower
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg

--=-pMgNuowW/Mg0ZjKpVMFl
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAktO8oQACgkQBn4EFUVUIO0NugCeKjv35qlEtporfdu/mWho Qm8I
nGQAmwW4ri5rnJqONN4w79AK3cQ/NBu3
=U0pA
-----END PGP SIGNATURE-----

--=-pMgNuowW/Mg0ZjKpVMFl--