[ale] apache/linux performance tuning [long]

greg at turnstep.com greg at turnstep.com
Tue Aug 28 20:04:03 EDT 2001




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

> Well I was just curious as to how large a hit it might be, 
> and whether or not Apache tried to cache the info in order 
> to reduce the impact.

The hit is potentially huge, as Apache must wait for an external 
program to run and make a reverse lookup for an IP address. This 
means it has to go out on the net and wait for a program on 
another machine to dole out some info. Apache does not cache the 
info, but the local nameserver should, which may help matters. A 
far better way is to parse the logs after the fact with a simple 
perl script, perhaps as part of the cronjob that rotates old 
scripts out. This program can implement caching itself: you could 
probably even maintain it longer than a day and not have too 
many problems as the DNS info does not change that rapidly. This 
should be good enough for aggregate reporting and statistics. 
Specific IPs should always be looked up "real-time". (And yes, 
the names can be useful, up to a point.)

If you really want to see some impressive speed, try out 
some of the other web servers out there, all of which 
blow away Apache when it comes to speed (but they are designed 
to be fast, not featureful)

tux, khttpd: kernel-based, these are extraordinarily fast. 
kfttpd is included in recent kernels but does no virtual hosting 
without patches, while tux does virtual hosting but must 
be downloaded and installed yourself (comes with pretty rpms 
however if that is your cup of tea). These are excellent for 
static pages (e.g. images) and "pass-through" requests 
they cannot handle to another browser (e.g. Apache)

boa, thttpd: extremely fast, non-forking/non-threading servers. 
Both have limited virtual hosting support, limited cgi.

Of the above, I like thttpd the best, at least until the 
kernel ones mature a little but more. Try it out: it takes 
about 5 minutes to install. I guarantee it will blow away 
any NT box. thttpd even has throttling...a nice thing if 
you are ever slashdotted :)

There are some other web servers out there too, just wanted to 
throw out a few options for people to play with. And of course 
Apache itself is a great web server: I'm sure there is a reason 
why it was so slow with the original poster. Check out the 
performance guide on apache.org for some good tips:

http://httpd.apache.org/docs/misc/perf-tuning.html

thttpd:
http://www.acme.com/software/thttpd/thttpd.html

boa:
http://www.boa.org/

kttpd:
http://www.fenrus.demon.nl/
(terrible page, do a more on your 
/usr/src/linux/net/khttpd/README file instead)

tux:
http://www.redhat.com/support/manuals/TUX-2.0-Manual/


Greg Sabino Mullane
- ---------------------------------------------------------------
/~\ The ASCII
\ / Ribbon Campaign     *greg at turnstep.com*
 X  Against HTML        PGP Key: 0x14964AC8
/ \ Email!              200108282000

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
Comment: http://www.turnstep.com/pgp.html

iQA/AwUBO4wwzbybkGcUlkrIEQK94wCg3ZRWBTLUnnw5VZB3SImA/vPugcsAoNiI
zCze4ZcEpo7e2z9icfJ0aMP9
=v8ro
-----END PGP SIGNATURE-----


--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list