<div dir="ltr"><div class="gmail_extra">Thanks for your response.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Is this mean if I want to create an instance with flavor: 16G memory (<span style="color:rgb(80,0,80);font-size:14px">hw:mem_page_size=large), I need to preserve memory more than 16GB ?</span></div><div class="gmail_extra"><font color="#500050"><span style="font-size:14px">This instance consume hugepages resource.</span></font></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-06 1:47 GMT+08:00 Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Please remember to add a topic [nova] marker to your subject line. Answer below.<span><br>
<br>
On 09/05/2017 04:45 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">
Dear all,<br>
<br>
I have a compute node with 64GB ram. And I set 50 hugepages wiht 1GB hugepage size. I used command "free", it shows free memory is about 12GB. And free hugepages is 50.<br>
</blockquote>
<br></span>
Correct. By assigning hugepages, you use the memory allocated to the hugepages.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Then I launch an instance with 16GB memory, set flavor tag : hw:mem_page_size=large. It show Error: No valid host was found. There are not enough hosts available.<br>
</blockquote>
<br></span>
Right, because you have only 12G of RAM available after creating/allocating 50G out of your 64G.<br>
<br>
Huge pages are entirely separate from the normal memory that a flavor consumes. The 16GB memory in your flavor is RAM consumed on the host. The huge pages are individual things that are consumed by the NUMA topology that your instance will take. RAM != huge pages. Totally different things.<span><br>
<br>
 And I check nova-scheduler log. My<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
compute is removed by RamFilter. I can launch an instance with 8GB memory successfully, or I can launch an instance with 16GB memory sucessfully by remove RamFilter.<br>
</blockquote>
<br></span>
That's because RamFilter doesn't deal with huge pages. Because huge pages are a different resource than memory. The page itself is the resource.<br>
<br>
The NUMATopologyFilter is the scheduler filter that evaluates the huge page resources on a compute host and determines if the there are enough *pages* available for the instance. Note that I say *pages* because the unit of resource consumption for huge pages is not MB of RAM. It's a single memory page.<br>
<br>
Please read this excellent article by Steve Gordon for information 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>
<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"><span>
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></span>
______________________________<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>
</blockquote>
<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>
</blockquote></div><br></div></div>