[Haskell] Re[2]: [Haskell-cafe] Is Haskell a Good Choice for
WebApplications? (ANN: Vocabulink)
wren ng thornton
wren at freegeek.org
Sun May 10 00:23:59 EDT 2009
Ketil Malde wrote:
> wren ng thornton <wren at freegeek.org> writes:
> > FWIW, the JVM also fails to release memory resources back to the
> > OS. Given all the problems I've seen that one cause for long-running
> > processes, I'm definitely in support of correcting any behavior like
> > this in the GHC RTS.
>
> I'm curious what real problems arise from this? As far as I can tell,
> virtual memory and overcommit ought to make this (i.e. not releasing
> memory back to the OS) mostly harmless. Is this on particular systems
> with different properties than your average run-of-the-mill Unix?
Consider a process, A, which goes through a cycle of spawning off
another process, B, and reaping its output. More specifically, A
consumes a lot of memory when B is not running, but then flushes most of
it before spawning B and then idles until B is done. Also B consumes a
lot of memory (which is always returned to the system each time B is
terminated).
If A cannot return memory to the system prior to spawning B, this will
cause the OS to over-commit memory, which will cause various OSes to
either kill the process, start thrashing, or other Bad Things(tm). I'd
have to ask my coworker which particular systems caused the most
problems, but we target all of Linux, OSX, and Windows for the toolkit
that includes both A and B.
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list