[racket] racket http server, major GC: -216 bytes collected

From: Stefan Schmiedl (s at xss.de)
Date: Tue Jan 11 18:28:54 EST 2011

On Tue, 11 Jan 2011 16:28:50 -0600
Robby Findler <robby at eecs.northwestern.edu> wrote:

> I don't quite understand if you're showing us the full output or if
> we're seeing something that's abridged somehow (I thought you were
> saying that we're seeing only one line for every 20 seconds, but that
> would mean that the webserver took several minutes to start up which
> doesn't seem right) but, in any case, that pattern of memory use would
> indicate to me that nothing is wrong. Specifically, the memory total
> is not growing (beyond some epsilons that don't mean much).
> 
> Am I misreading something somehow?

Yes, sorry for not being clear.

- The results are quoted as they appeared between the command I entered
  and when I stopped the process.
- The startup takes about a second or so, those are _minor_ GCs, which
  are not triggered by my code.
- "My" GCs are (most of) the _major_ GCs appearing below the line reporting the
  creation of the thread. The LRU collect procedure calls collect-garbage
  twice itself.
- The first two clean up the debris after getting the server to run
- The "0 bytes" GCs happen every two seconds and can't collect anything
  since "nothing happens".
- Every 20 secs (10 "0 bytes" GCs) the LRU manager does its thing
  which causes some memory to be tagged as "in use".

While the amount _is_ quite small, I am still concerned by it. I am
currently looking for a platform to develop and deploy one or two
web apps on, and a memory leak would mean that I either can't use
racket or would have to work around it in some way. Memory leaks tend
to become serious, as soon as I take a vacation...

Hey, I _can_ look into the future by speeding things up even further.
Let's look at what happens if I let the LRU manager look once per second.

Ah, ok. The memory usage does level. I just takes longer to reach
the plateau than I thought it would. About 400 iterations through
the LRU loop, if I read my diagram correctly.

Wow. Good to be on the wrong track :-)

Relieved,
s.


Posted on the users mailing list.