Excellent info Rick,  Thank you!

Darryl

-----Original Message-----
From: Rick Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Apache Help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Delao, Darryl W wrote:
| I currently have 3 web servers, each dual 2.4 xeon's with 6 gig of
| ram, all load balanced. However, I am expecting anywhere from 2000 to
| 4000 users on my servers at any given time within the next few weeks,
| therefore I am trying to make apache more efficient. It would be nice
| to make each server handle 1000 requests.

Recompiling is the only way to go. I'm assuming you're running Red Hat
8.0 and using Apache 2.0.40. See bottom if you're not.

I was able to do the following on my servers in order to convert:

rpm -ivh httpd-2.0.40.src.rpm

Then edit /usr/src/redhat/SPECS/httpd.spec. The following changes will
need to be made...

Change the line which says:

- --with-mpm = prefork \

to

- --with-mpm = worker \
- --enable-cgi \

Second line required to keep mod_cgi in the package - dunno why it's
excluded by default when compiling w/ worker vs. prefork. Not including
it will prevent httpd from starting as it can't find mod_cgi as
specified in httpd.conf. Not including it and remarking it from your
httpd.conf will remove cgi-bin functionality.

Lastly, to increase the number of servers, add the
DEFAULT_SERVER_LIMIT=32 statement to the beginning of the configure line
by changing the following line:

CFLAGS="$RPM_OPT_FLAGS" \

to

CFLAGS="$RPM_OPT_FLAGS -DDEFAULT_SERVER_LIMIT=32" \

The number I chose when multiplied by the default MaxThreads of 64 will
allow 2048 concurrent users. You can adjust one or the other to suit,
but I'd go w/ more servers before increasing the threads beyond 64.

You may also want to add "worker" to the RPM Release: line of the spec
file. I made mine 8worker to get 2.0.40-8worker in order to
differentiate the set of RPMs. Lastly save the spec file - I'd call it
something different like httpd-worker.spec

Then, rebuild your RPM's using the following command:

rpmbuild -bb --target i686-redhat-linux-gnu httpd-worker.spec

replacing i686 with athlon or i386 or whatever you want to compile for.
For your Xeon's, I'd do i686 at minimum (you could edit the macro to
match your -march but that may not prove beneficial).

This will build 4 RPM's within /usr/src/redhat/RPMS/i686. Then run

rpm -Uvh --force <rpm names>

to install your updated version.

This, combined w/ the MaxServerThreads 64 directive and MaxClients set
to 2048 in your httpd.conf under the worker section will allow 2048
concurrent users.

Now if you're running Red Hat 7.3 or earlier with Apache 1.3x, or desire
to keep the prefork functionality, just change the
- -DDEFAULT_SERVER_LIMIT=32 to 1000 or whichever you desire to be your max
users. Note going w/ the worker model will use considerably less
memory/resources and is highly recommended if applicable to your situation.

Reference the following PDF file for more info on Improving Apache's
performance (only a piece, but it's the info I needed):

http://archive.devx.com/java/wrox/7221_chap08.pdf

Hope this helps. Worked for me.
- -Rick
- --
Rick Johnson, RHCE - [EMAIL PROTECTED]
Linux/WAN Administrator - Medata, Inc.
PGP Public Key: https://mail.medata.com/pgp/rjohnson.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Signed/Encrpyted for your protection

iD8DBQE96+rMIgQdhlSHZgMRAhwdAJ9/7/t3Oe0hcwC3fFeeCppo+vAFRgCeLMBf
yBdqwVzAcy/0pjVPY5rSDY0=
=e5KD
-----END PGP SIGNATURE-----




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to