Tweaking the garbage collector for realtime usage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tweaking the garbage collector for realtime usage

Peter Verswyvelen-2
The GHC documentation lists a lot of tweaks that can be done to the garbage collector.

However, Haskell spin-offs like Timber implement their own incremental garbage collector that is better suitable for real-time usage.

Did someone already fiddle with GHC's gc flags so it works better for real-time applications, like games and simulations?





_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Tweaking the garbage collector for realtime usage

Don Stewart-2
bugfact:
> The GHC documentation lists a lot of tweaks that can be done to the garbage
> collector.
>
> However, Haskell spin-offs like Timber implement their own incremental garbage
> collector that is better suitable for real-time usage.
>
> Did someone already fiddle with GHC's gc flags so it works better for real-time
> applications, like games and simulations?

Galois uses GHC's rts for things that have to have low latency. Useful
tweaks include:

    * setting the heap size high
    * using the threaded runtime system
    * messing with the scheduler tick rate
    * patching the rts to avoid slow bits (like deadlock detection)

I think since games and simulations aren't strictly "real time" you
should be ok.

-- Don
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Tweaking the garbage collector for realtime usage

Achim Schneider
In reply to this post by Peter Verswyvelen-2
Peter Verswyvelen <[hidden email]> wrote:

> The GHC documentation lists a lot of tweaks that can be done to the
> garbage collector.
> However, Haskell spin-offs like Timber <http://www.timber-lang.org/>
> implement their own incremental garbage collector that is better
> suitable for real-time usage.
>
> Did someone already fiddle with GHC's gc flags so it works better for
> real-time applications, like games and simulations?
>
Under j2me, we just ran the gc every bleeding frame, even after paying
painstakingly much attention not to allocate anything while simulating
(virtually every vm out there seems to accumulate junk transparently),
to keep the runs small/short and framerate even.

--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe