> >> The time spent in ap_brigade_puts is > >> suprising... This particular run indicate that it tool 74355 > >> instructions > >> to serve a keep alive request. > >> > > > > I've seen the brigade_puts overhead in my testing, too...and it > > is definitely surprising, since the code is relatively minimal. > > The only obvious (potential) speedup I can think of would be to > > replace the char-at-a-time loop with a memcpy (with checks to > > make sure it doesn't overflow the available size). I'll try this > > over the weekend. > > > I remembered why memcpy won't help here: we don't know the > length in advance. But I managed to speed up apr_brigade_puts() > by about 30% in my tests by optimizing its main loop. Does this > patch reduce the apr_brigade_puts() overhead in your test environment? > > --Brian
Haven't had a chance to profile it yet, but the patch seems to provide a 1 to 2% improvement in throughput serving a 500 byte file out of mod_mem_cache. Bill