<div dir="ltr">By default mmap() only sets up address space, but doesn't necessarily bind that address space to actual RAM.  Normally that binding is populated "on demand" via page faults.  (There are various flags to mmap() to modify this behaviour.)<div><br></div><div>Perhaps check if /proc/$pid/maps contains an 8GB anonymous mapping? (where $pid is the pid of your beam process)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 6, 2017 at 7:10 AM, Rick Payne <span dir="ltr"><<a href="mailto:rickp@rossfell.co.uk" target="_blank">rickp@rossfell.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I'm running the beam under OSv - a unikernel that tries to be ABI compatible with Linux, modulo a few things (such as no fork). Unfortunately, I'm seeing lots of memory fragmentation with my workload, probably due to issues in OSv's memory management.<br>
<br>
I had thought there was a way to get erlang to preallocate memory in advance using super-carriers, such that i could then rely on the beam to manage memory and hopefully not suffer the same fragmentation issues. However, I am failing to make this work.<br>
<br>
>From my reading of the erts_alloc page, I have tried setting +MMscs to 8192 (as I want to allocate 8GB). This doesn't seem to happen (looking at the OSv stats - the memory isn't allocated). Have I misunderstood?<br>
<br>
It could also be that some facilities are not supported by OSv (but it does support mmap for instance) - so a pointer as to what to check would be most useful.<br>
<br>
Cheers,<br>
Rick<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
</blockquote></div><br></div>