[Haskell-cafe] STM friendly TreeMap (or similar with range scan api) ? WAS: Best ways to achieve throughput, for large M:N ratio of STM threads, with hot TVar updates?

Ben Gamari ben at well-typed.com
Fri Jul 31 13:36:10 UTC 2020

Simon Peyton Jones via Haskell-Cafe <haskell-cafe at haskell.org> writes:

> > Compl’s problem is (apparently) that execution becomes dominated by
> > GC. That doesn’t sound like a constant-factor overhead from TVars, no
> > matter how efficient (or otherwise) they are. It sounds more like a
> > space leak to me; perhaps you need some strict evaluation or
> > something.
> My point is only: before re-engineering STM it would make sense to get
> a much more detailed insight into what is actually happening, and
> where the space and time is going. We have tools to do this (heap
> profiling, Threadscope, …) but I know they need some skill and insight
> to use well. But we don’t have nearly enough insight to draw
> meaningful conclusions yet.
> Maybe someone with experience of performance debugging might feel able
> to help Compl?

If you want to discuss the issue feel free to get in touch on IRC. I
would be happy to help.

It would be great if we had something of a decision tree for performance
tuning of Haskell code in the users guide or Wiki. We have so many tools
yet there isn't a comprehensive overview of

 1. what factors might affect which runtime characteristics of your
 2. which tools can be used to measure which factors
 3. how these factors can be improved


- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20200731/4c3efd4e/attachment.sig>

More information about the Haskell-Cafe mailing list