[Haskell-cafe] GDB and ticks

Mikolaj Konarski mikolaj at well-typed.com
Mon Oct 18 14:44:38 UTC 2021


I've just done some non-scientific benchmarks that show that in code
with a lot of (I presume) unsafe FFI calls such as buffered `putStr`
on Linux, performance can drop by half and even more with `+RTS -V0`.
I can share if anybody is interested. BTW, this is orthogonal to
`-threaded` which in my benchmarks slows no-FFI code with a few
threads by 20%, safe FFI calls-heavy code (SDL2 graphics) by 50% and
speeds up unsafe FFI-heavy code (`putStr`).


On Mon, Oct 18, 2021 at 4:35 PM Brandon Allbery <allbery.b at gmail.com> wrote:
>
> Sadly, it also comes with a price: everything including GCs runs at every context switch instead of waiting for an appropriate number of ticks to pass. (That said, I've also been bitten by the interrupt issue.)
>
> On Mon, Oct 18, 2021 at 10:28 AM Donn Cave <donn at avvanta.com> wrote:
>>
>> quoth Henning Thielemann <lemming at henning-thielemann.de>
>> > On Mon, 18 Oct 2021, Sylvain Henry wrote:
>> > > The timer isn't only used for profiling, it is used for scheduling too.
>> > > You can disable it with `+RTS -V0` (cf
>> > > https://ghc.gitlab.haskell.org/ghc/doc/users_guide/debug-info.html#tutorial)
>> >
>> > Cool, this works!
>>
>> What does it break?  Just about anything I'd run that was written in
>> Haskell must run this way, to avoid fatal interrupts in things like
>> socket I/O, so it's essentially a default - everything must be built
>> with -rtsopts, and run with GHCRTS=-V0 environment.
>>
>>         Donn
>> _______________________________________________
>> Haskell-Cafe mailing list
>> To (un)subscribe, modify options or view archives go to:
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>> Only members subscribed via the mailman list are allowed to post.
>
>
>
> --
> brandon s allbery kf8nh
> allbery.b at gmail.com
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.


More information about the Haskell-Cafe mailing list