<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<div><br></div><div>I don't wish to thread-jack, but I am anyway ;-)</div><div><br></div><div>This pertains to a feature I would like to see in Erlang. The ability to set an optional "memory limit" when a process and ETS table is created (and maybe a global optional per-process limit when the VM is started). I've seen a few cases where, due to software bugs, a process size grows and grows; unfortunately as things stand today the result is your entire VM crashing - hopefully leaving you with a crash_dump. </div><div><br></div><div>Having such a limit could cause the process to terminate (producing a OOM crash report in erlang.log) and the crashing process could be handled with supervisor rules. Even better you can envisage setting the limits artificially low during testing to catch these types of bugs early on.</div><div><br></div><div>Cheers</div><div><br></div><div>Matt</div><div><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Tue, 5 Feb 2013 08:51:16 +0100<br>From: gustav.simonsson@gmail.com<br>To: solomon.wzs@gmail.com<br>CC: erlang-questions@erlang.org<br>Subject: Re: [erlang-questions] How to see which processes used ets table?<br><br><div dir="ltr"><div><div>Note that erlang:memory/1 gives memory in bytes, whereas ets:i/0 gives it in words. On a 64-bit system 625M words would be 5GB, so the numbers you get might be correct. Try summing the memory from ets:i/0 up exact and compare it to erlang:memory(ets).<br>
<br></div>Cheers,<br></div>Gustav Simonsson<br></div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">On Tue, Feb 5, 2013 at 3:42 AM, Solomon <span dir="ltr"><<a href="mailto:solomon.wzs@gmail.com">solomon.wzs@gmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I checked system info with erlang:memory/1 and found the total amount of memory allocated for ets
              tables was about 5GB.<br><br></div>Then I sum the memory size return by ets:i/0 and it was about 600MB.<br><br></div>So which processes used ets table and did not return by ets:i/0?<br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions</div></div>                                       </div></body>
</html>