[Haskell-cafe] OS swapping and haskell data structures

Ketil Malde ketil at ii.uib.no
Wed Aug 8 03:33:47 EDT 2007

On Tue, 2007-07-31 at 22:45 -0700, Alex Jacobson wrote:
> If you create a Data.Map or Data.Set larger than fits in physical 
> memory, will OS level swapping enable your app to behave reasonably or 
> will things just die catastrophically as you hit a memory limit?

It will die (catastrophically or not is in the eye of the beholder, I
guess) when you exhaust heap or swap limits (set with +RTS options), or
the maximum available memory (physical+swap or ulimit).

In my experience, performance quickly becomes unbearable (and also Linux
tends to be less than responsive) when you exceed physical memory, so I
generally always use +RTS -Mx, with x about 80% of physical RAM.  

In fact, I often use a C file to set these parameters directly, I think
I ripped it (or the idea) from darcs. See e.g.


More information about the Haskell-Cafe mailing list