httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Harris" <>
Subject RE: [patch] smarter free block allocation to fix leak
Date Thu, 05 Aug 1999 21:35:28 GMT

Thorsten von Eicken wrote:
> Mhh, this is nice, but... I'm concerned you guys are basing decisions on
> the memory allocation pattern during initialization, which doesn't seem
> like the smartest thing to do. Is it difficult to run your test set-up
> through thousands of requests? Or maybe I'm missing something -- my
> apologies in that case.
>          Thorsten

I could setup the same memory usage logging patch and put it on a server and
capture statistics for a ten or so thousand requests. I'm not running anything
fancy: just CGI with some mod_rewrite and some basic auth handlers.

Is this worth doing?

Actually... I've attached the patch in case anybody wants it. The base for the
patch is Apache+EAPI, so you will have to hand apply this if you want to patch
a bare Apache installation.

After applying the patch, when you start httpd, It's important to redirect
STDERR so it's being appended to the error_log to catch the debug stuff before
the error log is opened.

When you want to see a summary of the new block creation, use this one liner
perl script:

grep "^new_block" error_log | perl -ne ' while (<STDIN>) { /min size
=\s+(\d+),\s+\d+/ and $a->{$1}++ }; foreach (sort {$a <=> $b} keys %$a) { print
sprintf("%10d %10d\n",$_,$a->{$_}); }; '

 - David Harris
   Principal Engineer, DRH Internet Services

View raw message