[Haskell-cafe] OS swapping and haskell data structures

Bryan O'Sullivan bos at serpentine.com
Wed Aug 1 14:31:52 EDT 2007

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?

Relying on the OS to page portions of your app in and out should always 
be the fallback of last resort.  You are fairly guaranteed to get 
terrible performance because the VM subsystem can't anticipate your 
app's memory access patterns, and catastrophic death of either your app 
or other system processes is a strong possibility (Google for "OOM 
killer" if you want some horror stories).  In many cases, you can't even 
rely on paging being possible.


More information about the Haskell-Cafe mailing list