<div dir="auto">Hi Sean,<div dir="auto"><br></div><div dir="auto">I can confirm that using only hw:mem_page_size=large on used flavor is working  with 2MB hugepage. </div><div dir="auto"><br></div><div dir="auto">Anyway, I'm still curious about how Nova selects the hugepage size there is 2MB and 1GB hugepage on the hypervisor and I only put hw:mem_page_size=large on used flavor. Maybe you can explain more about this.</div><div dir="auto"><br></div><div dir="auto">Best regards.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 13, 2023, 9:27 PM Sean Mooney <<a href="mailto:smooney@redhat.com">smooney@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 2023-02-13 at 21:21 +0700, Lazuardi Nasution wrote:<br>
> Hi Sean,<br>
> <br>
> Thank you for your explanation. I want to use the 2MB hugepage. So, do you<br>
> mean that I have to put hw:mem_page_size=large on used flavor and<br>
> hw_mem_page_size=2MB used image? What is the difference with current<br>
> hw:mem_page_size=2MB on used flavor only?<br>
<br>
in general we recomend agains using explict page size unless required after extensive performance testing<br>
<br>
so generally i would just suggest using hw:mem_page_size=large in the flaovr.<br>
<br>
if you need to use exiplcit page size for a specifc VNF we advise that you set hw_mem_page_size=2MB<br>
on the image.<br>
<br>
That way if you hae 1 flavor with hw:mem_page_size=large and 3 images one with hw_mem_page_size=2MB<br>
another with hw_mem_page_size=1G and a third with hw_mem_page_size not set all 3 images can use the same<br>
flavor.<br>
<br>
you should prefer to keep the flaovrs generic by using hw_mem_page_size=large|small|any and only set explict page<br>
zises in the images that need that granularity.<br>
<br>
you can set explcit pages sizes in the flavor too but it leasds to a combinitorial flavor explostion and is gernerally<br>
required. in 90% of cases hw:mem_page_size=large in the flavor is all that is requried.<br>
> <br>
> Best regards.<br>
> <br>
> On Mon, Feb 13, 2023 at 8:45 PM Sean Mooney <<a href="mailto:smooney@redhat.com" target="_blank" rel="noreferrer">smooney@redhat.com</a>> wrote:<br>
> <br>
> > On Mon, 2023-02-13 at 18:22 +0700, Lazuardi Nasution wrote:<br>
> > > Hi,<br>
> > > <br>
> > > There is a weird situation if it is not a bug.<br>
> > > <br>
> > Its not a bug<br>
> > <br>
> > hw_mem_page_size can be used in the image only if<br>
> > hw:mem_page_size=larage or  hw:mem_page_size=any<br>
> > <br>
> > in the case of  hw:mem_page_size=large the image can be used to choose a<br>
> > speccific hugepage size<br>
> > <br>
> > hw:mem_page_size=large  hw_mem_page_size=1G<br>
> > <br>
> > hw:mem_page_size=any will by default be the same as hw:mem_page_size=small<br>
> > and use the smallest pagezise<br>
> > which is typically 4k. the differnece bettwen hw:mem_page_size=any and<br>
> > hw:mem_page_size=small is<br>
> > hw:mem_page_size=any allows the image to set any value for<br>
> > hw_mem_page_size.<br>
> > so<br>
> > hw:mem_page_size=any and hw_mem_page_size=large is valid where as<br>
> > hw:mem_page_size=small and hw_mem_page_size=large is not and will raise an<br>
> > error.<br>
> > <br>
> > when hugepage support was added it was decided that permission form the<br>
> > operator was required<br>
> > to allow you to request hugepages via the image which is why the flavor<br>
> > must have and hw_mem_page_size=large|any<br>
> > set.<br>
> > <br>
> > >  Hugepage instance launching<br>
> > > is working if I put hw:mem_page_size on the used flavor. But, when I try<br>
> > > the same launching configuration and change hw:mem_page_size on used<br>
> > flavor<br>
> > > to hw_mem_page_size on used image, it cannot work as expected. It seems<br>
> > > that this issue is like on<br>
> > > <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1791132" rel="noreferrer noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1791132</a>, but it still<br>
> > happens<br>
> > > on Zed. Is this an old bug? Should I submit a bug report for this?<br>
> > no we cloased <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1791132" rel="noreferrer noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1791132</a> as not<br>
> > a bug because they were not aware of this requriement.<br>
> > > <br>
> > > Best regards.<br>
> > <br>
> > <br>
<br>
</blockquote></div>