<html><head></head><body><div class="ydpe49087c2yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">This is pretty useful thanks, we noticed often we would have 30% CPU usage via microstate accounting for the allocator.  Bumped the min_heap_size but looking for other possible optimizations.  I think then we can disable hugepages set as kernel cmdline for now and just allocate a large chunk of the system ram as a supercarrier.</div><div><br></div>
        
        </div><div id="yahoo_quoted_9006061668" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, May 6, 2020, 12:31:45 p.m. EDT, Mikael Pettersson <mikpelinux@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">On Wed, May 6, 2020 at 4:51 PM Vans S <<a shape="rect" ymailto="mailto:vans_163@yahoo.com" href="mailto:vans_163@yahoo.com">vans_163@yahoo.com</a>> wrote:<div class="yqt2085367884" id="yqtfd84128"><br clear="none">><br clear="none">> Has anyone gotten Erlang to use hugepages on linux?  I allocated the default 2MB pages via kernel param, but I see they are not used when I run erlang, I also made it allocated in 2047 sized blocks as recommended by WhatsApp team (tho why 2047 and not 2048).<br clear="none">><br clear="none">> Also what about disabling THP, anyone tested with and without?</div><br clear="none"><br clear="none">I did some experiments a few years ago with hugepages and 2TB RAM servers.<br clear="none"><br clear="none">First THP (transparent hugepages) did not work well, as they caused<br clear="none">major responsiveness issues whenever the kernel decided to "do stuff"<br clear="none">behind our back.  We always disable THP, and folks at EUC (now Code<br clear="none">BEAM Sto) mentioned doing the same.  Maybe the 4.x/5.x kernels have<br clear="none">improved, but CentOS 7 is definitely affected.  YMMV.<br clear="none"><br clear="none">Second, without THP you need to tell the kernel explicitly to give you<br clear="none">hugepages via a flag in mmap().  Back then (R15-ish) OTP wouldn't do<br clear="none">that so I had to hack it in, but it didn't help much as we were<br clear="none">dominated by other costs.<br clear="none"><br clear="none">Later on they added Super Carriers (pre-allocation), and that's a<br clear="none">must-have for large RAM nodes.  Mapping those with explicit hugepages<br clear="none">should be beneficial, but OTP would still need a patch to do so.</div></div>
            </div>
        </div></body></html>