[erlang-questions] Pre-allocating memory
Mon Nov 6 07:10:19 CET 2017
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.
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.
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?
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.
More information about the erlang-questions