Its been awhile since I brought this up, but made I a small patch to the memory supervisor that has fixed most of the memory usage problems. Basically, I just force a garbage collect before checking the memory alarm condition:<br>
<br>diff -r 7b0512cdf3bc src/vm_memory_monitor.erl<br>--- a/src/vm_memory_monitor.erl��� Thu Nov 05 15:19:05 2009 +0000<br>+++ b/src/vm_memory_monitor.erl��� Thu Nov 05 13:48:06 2009 -0800<br>@@ -174,6 +174,7 @@<br>�<br>�internal_update(State = #state { memory_limit = MemLimit,<br>
��������������������������������� alarmed = Alarmed}) -&gt;<br>+��� [garbage_collect(P) || P &lt;- processes()],<br>���� MemUsed = erlang:memory(total),<br>���� NewAlarmed = MemUsed &gt; MemLimit,<br>���� case {Alarmed, NewAlarmed} of<br>
<br>Indeed, this is a bit heinous, but it gets the job done. Unfortunately, I don&#39;t have the appropriate bug id so I didn&#39;t create an hg branch for you to pull from. <br><br>As far as overall system effects go, I haven&#39;t noticed any (aside from the lack of crashes). We have been running this in production for a bit and haven&#39;t seen any large problems, although the application is low throughput. Are there any performance unit tests that I can run to check this?<br>
<br>Stephen J Day <br>