4

I have a cabal benchmark that uses criterion to generate reports, and I also need to use threadscope to revise the parallelism.
I just got it setup, so it's only 4 functions, about 8 seconds of execution, and just from that the eventlog file's size gets to 500-800mb which is problematic - threadscope's loading frequently freezes & takes a very long time even on RAM disk & a very good modern machine.

I assume I don't understand the workflow of how this is meant to be done.
Actual projects would consume more than enough memory & time to make it entirely impractical.

What's the practice to handle this?

MasterMastic
  • 20,711
  • 12
  • 68
  • 90
  • Have you tried [other flags](http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-eventlog)? If `-l-ags` works fine, you probably create too many sparks. Note that I haven't used ThreadScope in an actual project yet, but this might be a first step to a solution. – Zeta Sep 17 '14 at 17:28
  • @Zeta Thank you - I did, and that file size is just for essential information. – MasterMastic Sep 17 '14 at 19:57
  • This is a real problem with threadscope and the `ghc-events` library. I've found two items in particular that bloat the eventlog: thread messages (spawn/start/stop) and safe foreign calls (which create more thread messages). If you can reduce either of those for a short time period doing the analysis might be more manageable. – John L Sep 17 '14 at 23:47
  • Also you might start by just dumping the eventlog with `ghc-events` and looking for common lines. If you have a lot of stack or heap overflows, you can tune the GC params to reduce those. – John L Sep 17 '14 at 23:49

0 Answers0