<div><div><div><div>On Sat, Sep 17, 2011 at 1:38 AM, Jesse Schalken <span dir="ltr">&lt;<a href="mailto:jesseschalken@gmail.com" target="_blank">jesseschalken@gmail.com</a>&gt;</span> wrote:</div><div><div><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There might be a way to do it, I don&#39;t know, but this sounds like an <a href="http://www.perlmonks.org/index.pl?node_id=542341" target="_blank">XY</a> <a href="http://mywiki.wooledge.org/XyProblem" target="_blank">problem</a>. Can I ask what you&#39;re trying to achieve by doing this, or is it just out of curiosity regarding how much garbage is created? (It&#39;s a lot, by the way. Since the only thing a purely functional program can do is create data and read data (as opposed to create, read and update in an impure program) I imagine a purely functional program without GC would hit OOM very, very quickly.)</blockquote>
<div><br></div><div>Sure. I&#39;m writing a server that serves a number of long-lived TCP connections. The clients can be served mostly independently; there is a bit of shared state among the different connections. I&#39;d like to use the concurrency available to scale the server to handle a large number of clients. Ideally I would just use more cores to handle a larger number of clients. It seems that GC is the biggest obstacle to doing this. The problem seems to be that the current GC stops all the processors before performing a GC. With a large number of processors this becomes expensive, and I find that a program that has really high mutator productivity with one processor can get terrible productivity at 12 or more processors. Of course, it helps to reduce the allocation rate of the program, but even after being very careful about how much memory is allocated, GC still takes up a significant amount of time. So I was looking for a way to turn off GC altogether just as an experiment to see how the program would perform without all the GC pauses.</div>
<div><br></div><div>--Andreas</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>

<div><div><div></div><div><br>On Thu, Sep 15, 2011 at 2:42 AM, Andreas Voellmy &lt;<a href="mailto:andreas.voellmy@gmail.com" target="_blank">andreas.voellmy@gmail.com</a>&gt; wrote:<br>&gt; Hi everyone, <br>&gt; Is there a way to completely turn garbage collection off in the Haskell<br>


&gt; runtime system? I&#39;m aware of the -A runtime option, but I&#39;d like to<br>&gt; completely turn it off, if possible. I&#39;m OK with running the program until<br>&gt; it runs out of memory, and I&#39;m willing to recompile GHC if needed. <br>


&gt; Regards,<br>&gt; Andreas<br></div></div>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>

&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>&gt;<br><br></div></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div></div></div></div></div>