[tbnl-devel] Re: New version 0.4.0

Bob Hutchison hutch at recursive.ca
Tue Mar 15 12:34:29 UTC 2005


On Mar 14, 2005, at 9:19 PM, Edi Weitz wrote:

> On Mon, 14 Mar 2005 19:30:48 -0500, Bob Hutchison <hutch at recursive.ca> 
> wrote:
>
>> Hit port 3000 from your browser, for example
>> <http://localhost:3000/tbnl-araneida> in my setup. You have to apply
>> the patches to Araneida 0.9 of course, and *make* *sure* you recompile
>> and use ASDF to load it.
>
> Hmm, I can't seem to reproduce the memory leaks you reported.  I've
> reloaded the info.html page from the test suite about 200 times and
> the output of (ROOM) is stable.  LW 4.4.0 on WinXP.

I'm using LW 4.4.0 on OS/X

I ran the following commands

<measure>
ab -n 200 -c 10 http://localhost:3000/tbnl-araneida | tee 
results.ab.3000
ab -n 200 -c 10 http://localhost:3000/tbnl-araneida | tee 
results.ab.3000
<measure>
ab -n 1400 -c 10 http://localhost:3000/tbnl-araneida | tee 
results.ab.3000
<measure>

Then using the process monitor saw the following growth (in MB):
         before     after 400    after 1400
real     70.74         77.86         89.82
virtual 249.16        461.91        969.97


(room) before
  Generation 0:  Total Size 14505K, Allocated 9137K, Free 5335K
  Generation 1:  Total Size 18806K, Allocated 3796K, Free 14977K
  Generation 2:  Total Size 16196K, Allocated 11197K, Free 4977K
  Generation 3:  Total Size 10631K, Allocated 10518K, Free 67K

(room) after 400
  Generation 0:  Total Size 14505K, Allocated 1964K, Free 12509K
  Generation 1:  Total Size 18934K, Allocated 3422K, Free 15479K
  Generation 2:  Total Size 18756K, Allocated 11816K, Free 6914K
  Generation 3:  Total Size 10631K, Allocated 10518K, Free 67K

(room) after 1400
  Generation 0:  Total Size 14505K, Allocated 1778K, Free 12694K
  Generation 1:  Total Size 19062K, Allocated 3454K, Free 15575K
  Generation 2:  Total Size 25796K, Allocated 11816K, Free 13954K
  Generation 3:  Total Size 10631K, Allocated 10518K, Free 67K

>
> BTW, how exactly does this direct connection to port 3000 work?
> Araneida isn't used at all and all the communication with the browser
> is directly handled by TBNL?  (Yeah, I could look it up myself but
> it's 3 a.m. here and I'm tired... :)

I changed get-apache-command to (unroll the first iteration of the loop 
and so) read the first line and check to see if it contains a space. If 
the line came from mod_lisp it will not have a space in it. If it has a 
space, we know it wasn't mod_lisp so assume that we've got a direct 
HTTP request. When handling HTTP, call the 
read-request-from-stream/tbnl function (just above get-apache-command 
in modlisp.lisp). This sets up the new araneida::*standard-araneida* 
special variable (to nil) and calls 
araneida::read-request-from-stream/guts which is a new entry point in 
Araneida that I added by breaking up the previous function 
(read-request-from-stream). It then adds a couple of headers (url, 
content-stream, and server-ip-port) that TBNL seems to want. It then 
calls process-apache-command and returns.

Cheers,
Bob

>
> Cheers,
> Edi.
>
>
----
Bob Hutchison          -- blogs at <http://www.recursive.ca/hutch/>
Recursive Design Inc.  -- <http://www.recursive.ca/>




More information about the Tbnl-devel mailing list