[Haskell-cafe] Optimizing a high-traffic network architecture
simonmar at microsoft.com
Thu Dec 15 08:53:27 EST 2005
On 15 December 2005 10:21, Joel Reymont wrote:
> Here are statistics that I gathered. I'm almost done modifying the
> program to use 1 timer thread instead of 1 per bot as well as writing
> to the socket from the writer thread. This should reduce the number
> of threads from 6k (2k x 3) to 2k plus change.
> It appears that +RTS -k3k does make a difference. As per Simon, 2-4k
> avoids the thread being garbage collected because each thread gets
> its own block in the storage manager. Simon, did I get that right?
The 3k threads are still GC'd, but they are not actually *copied* during
It'll increase the memory overhead per thread from 2k (1k * 2 for
copying) to 4k (4k block, no overhead for copying).
More information about the Haskell-Cafe