<div dir="ltr">I think the fact that RamFilter can't deal with huge pages is a bug , duo to this limit, we have to set a balance  between normal memory and huge pages to use RamFilter and <span style="color:rgb(80,0,80)">NUMATopologyFilter. what do you think Jay?</span><div><font color="#500050"><br></font><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 6, 2017 at 9:22 PM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 09/06/2017 01:21 AM, Weichih Lu wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks for your response.<br>
<br>
Is this mean if I want to create an instance with flavor: 16G memory (hw:mem_page_size=large), I need to preserve memory more than 16GB ?<br>
This instance consume hugepages resource.<br>
</blockquote>
<br></span>
You need to reserve fewer 1GB huge pages than 50 if you want to launch a 16GB instance on a host with 64GB of RAM. Try reserving 32 1GB huge pages.<br>
<br>
Best,<br>
-jay<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2017-09-06 1:47 GMT+08:00 Jay Pipes <<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a> <mailto:<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>>>:<div><div class="gmail-h5"><br>
<br>
    Please remember to add a topic [nova] marker to your subject line.<br>
    Answer below.<br>
<br>
    On 09/05/2017 04:45 AM, Weichih Lu wrote:<br>
<br>
        Dear all,<br>
<br>
        I have a compute node with 64GB ram. And I set 50 hugepages wiht<br>
        1GB hugepage size. I used command "free", it shows free memory<br>
        is about 12GB. And free hugepages is 50.<br>
<br>
<br>
    Correct. By assigning hugepages, you use the memory allocated to the<br>
    hugepages.<br>
<br>
        Then I launch an instance with 16GB memory, set flavor tag :<br>
        hw:mem_page_size=large. It show Error: No valid host was found.<br>
        There are not enough hosts available.<br>
<br>
<br>
    Right, because you have only 12G of RAM available after<br>
    creating/allocating 50G out of your 64G.<br>
<br>
    Huge pages are entirely separate from the normal memory that a<br>
    flavor consumes. The 16GB memory in your flavor is RAM consumed on<br>
    the host. The huge pages are individual things that are consumed by<br>
    the NUMA topology that your instance will take. RAM != huge pages.<br>
    Totally different things.<br>
<br>
      And I check nova-scheduler log. My<br>
<br>
        compute is removed by RamFilter. I can launch an instance with<br>
        8GB memory successfully, or I can launch an instance with 16GB<br>
        memory sucessfully by remove RamFilter.<br>
<br>
<br>
    That's because RamFilter doesn't deal with huge pages. Because huge<br>
    pages are a different resource than memory. The page itself is the<br>
    resource.<br>
<br>
    The NUMATopologyFilter is the scheduler filter that evaluates the<br>
    huge page resources on a compute host and determines if the there<br>
    are enough *pages* available for the instance. Note that I say<br>
    *pages* because the unit of resource consumption for huge pages is<br>
    not MB of RAM. It's a single memory page.<br>
<br>
    Please read this excellent article by Steve Gordon for information<br>
    on what NUMA and huge pages are and how to use them in Nova:<br>
<br>
    <a href="http://redhatstackblog.redhat.com/2015/09/15/driving-in-the-fast-lane-huge-page-support-in-openstack-compute/" rel="noreferrer" target="_blank">http://redhatstackblog.redhat.<wbr>com/2015/09/15/driving-in-the-<wbr>fast-lane-huge-page-support-in<wbr>-openstack-compute/</a><br>
    <<a href="http://redhatstackblog.redhat.com/2015/09/15/driving-in-the-fast-lane-huge-page-support-in-openstack-compute/" rel="noreferrer" target="_blank">http://redhatstackblog.redhat<wbr>.com/2015/09/15/driving-in-<wbr>the-fast-lane-huge-page-suppor<wbr>t-in-openstack-compute/</a>><br>
<br>
    Best,<br>
    -jay<br>
<br>
        Does RamFilter only check free memory but not free hugepages?<br>
        How can I solve this problem?<br>
<br>
        I use openstack mitaka version.<br>
<br>
        thanks<br>
<br>
        WeiChih, Lu.<br>
<br>
        Best Regards.<br>
<br>
<br>
        ______________________________<wbr>_________________<br>
        Mailing list:<br>
        <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
        <<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck</a>><br>
        Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br></div></div>
        <mailto:<a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openst<wbr>ack.org</a>><br>
        Unsubscribe :<br>
        <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><span class="gmail-"><br>
        <<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck</a>><br>
<br>
<br>
    ______________________________<wbr>_________________<br>
    Mailing list:<br>
    <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br></span><span class="gmail-">
    <<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck</a>><br>
    Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br></span>
    <mailto:<a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openst<wbr>ack.org</a>><br>
    Unsubscribe :<br>
    <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><span class="gmail-"><br>
    <<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck</a>><br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
<br>
</span></blockquote><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
______________________________<wbr>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Tang Yaguang</div><div><br></div><br><div> </div></div></div>
</div></div></div>