You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Paul J. Reder" <re...@raleigh.ibm.com> on 2000/12/18 19:18:09 UTC

Mod_include performance (and keep-alive).

I spent some time last week looking into mod_include performance (2.0 vs. 1.3).
I first compared a baseline of static pages on 2.0 vs. 1.3 then tried a page
that was loaded with SSIs. All of these results are averages of three runs
using the 2.0 Apache Bench. The results were as follows:

                      2.0               1.3              %difference (2.0 of 1.3)
Static
   w/keepalive       1134.9rps         1520.8rps          75%
   w/o keepalive     674.6rps          951.5rps           71%

SSI laden
   w/keepalive       55.6rps           307.7rps           18%
   w/o keepalive     149.9rps          307.6rps           49%

70-75% performance for an untuned unoptimized 2.0 is not too bad. 50% for
SSI laden files is a little poor, but 18% is pretty bad. There seems to be
some problem with the keep alive code which I did not try to track down but
that should probably be looked into.

I did some profiling of the SSI runs on Apache 2.0. After creating local
static functions that contained only the call to the various bucket macros
Although the critical point changes a little from one run to the next, it
seems like the ap_bucket_split code is one of the big factors in the low
SSI performance. I would assume that this is a result of the mallocs since
it doesn't really do much else (a bunch of assignments). This might be a
good argument for implementing the code to keep a pool of buckets for reuse.

The other routines that appear high on the list are mod_include routines like
find_star_sequence and get_tag_and_value. I will look at cleaning these up.

-- 
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein