ApacheStats v 0.4 - Copyright Rolf Poser - GNU Public License

TUNING:
=================

THE NEED FOR SPEED!

I've had one or two requests from people that are obviously trying to use this
for a larger installation of web servers and would want this to scale. By
default the script uses the LWP libraries that are simpler to install and use
but are very inefficient. So for all of those speed-jockeys out there, here
are some interersting stats and suggestions that you can try.

First some stats:

If you believe that ApacheStats is taking too long or creating too much
processing overhead, then here are some stats on experiments I tried on
a Redhat 9 server, querying the localhost. (Old PIII system..)

What vs Time for 100 queries, processed to create output: 

The following was obtained with version 0.3 of the apachestats scripts:

wget as the retriever - 8.017 seconds
lynx as the retriever - 9.301 seconds
w3m as the retriever - 13.418 seconds
using perl LWP libraries as retriever - 57.475 seconds !!

(these are best of 10 results performed under similar conditions)

The following stats are less comprehensive but use v0.4 on FC1:
(same box)

wget as retriever (high-speed script) - 4 seconds
LWP as retriever (default script) - 58 seconds

(each test represents 100 queries in succession)

It seems then (that for my platform at least), that wget is the best
way to retrieve the stats. Probably cached in memory (I have at least 30Mb
at any time) and using shared libraries perhaps??

If you have any suggestions on what I should try to optimise this
more, or a different mechanism, you're welcome to give me a shout!

[Note: I have made some improvements since the tests, so don't take these
as any form of absolute measure. As an idea of how the script now performs
after I've completed my mods, it now performs the speedtest in 7.789 seconds.
This is without supplying any details of hostname or apache version to the
script.]

Second, here is some detail about the high-speed script:

For the high-speed version of apache stats, you must use:

	scripts/ws_apachestats_hs.pl

Please modify to choose either wget or lynx and ensure that the path
information is correct. You should copy this to $cacti_home/scripts but

PLEASE REMEMBER TO CHANGE ITS NAME TO

	ws_apachestats.pl

Thirdly:

I always love to hear from you if you're using this in some sort of high-end
installation. It makes me proud, and let's me understand your requirements
better!

Thanks,
Rolf

rolf@stasolutions.co.za

