<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 19, 2017 at 8:03 AM, Michal Skrivanek <span dir="ltr">&lt;<a href="mailto:mskrivan@redhat.com" target="_blank">mskrivan@redhat.com</a>&gt;</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-"><br>
</span>Why not reserving regular hugepages for VMs on boot? </blockquote><div><br></div><div>Do you mean at hypervisor level? In this case it is what I&#39;m doing normally for physical servers where I install Oracle RDBMS</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">then you can use<br>
it with vdsm hook for that Oracle VM. </blockquote><div><br></div><div>Which hook are you referring?</div><div>This one:</div><div><a href="http://www.ovirt.org/develop/developer-guide/vdsm/hook/hugepages/">http://www.ovirt.org/develop/developer-guide/vdsm/hook/hugepages/</a><br></div><div>?</div><div>In case is it still current? In the sense that I need to mount the hugetblfs virtual file system at hst level?</div><div>The hook description seems low detailed...</div><div>Normally if I want oracle user able to use huge pages on physical server, I have to specify </div><div><br></div><div><div>#</div><div># Huge pages</div><div>#</div><div>vm.hugetlb_shm_group = 2000</div><div># 18GB allocatable</div><div>vm.nr_hugepages = 9216</div><div>#</div></div><div><br></div><div>where 2000 is the group id for dba group, the main group of oracle user</div><div><br></div><div>How to map this with vrtualization?</div><div>Eg:</div><div>1) vm.hugetlb_shm_group at hypervisor side should be set to the group of the qemu user as the qemu-kvm process runs with it?</div><div>2) Then I have to set VM for VM the hugepages=xxx value in the hook and that will bypass the sysctl.conf configuration in the guest?</div><div>3) I presume I have to set the vm.hugetlb_shm_group parameter at guest level....</div><div><br></div><div>Thanks,</div><div>Gianluca</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It improves VM performance in<br>
general, the only drawback is less flexibility since that memory can&#39;t<br>
be used by others unless they specifically ask for  hugepages.<br></blockquote><div><br></div><div>This seems to confirm that I have to set a statich sysctl.conf entry at hypervisor level such as</div><div>vm.nr_hugepages = YYYY<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also, I suppose you disable KSM, and I&#39;m not sure about ballooning,<br>
unless you need it I&#39;d disable it too.<br></blockquote><div><br></div><div>I kept the defaults at the moment that I suppose should be </div><div><br></div><div>a) KSM disabled </div><div><br></div><div>ksm has been configured to start by default as normally, but ksmtuned has been disabled:</div><div><br></div><div><div>[g.cecchi@ov300 ~]$ sudo systemctl status ksm</div><div>● ksm.service - Kernel Samepage Merging</div><div>   Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)</div><div>   Active: active (exited) since Tue 2017-04-11 11:07:28 CEST; 1 weeks 1 days ago</div><div>  Process: 976 ExecStart=/usr/libexec/ksmctl start (code=exited, status=0/SUCCESS)</div><div> Main PID: 976 (code=exited, status=0/SUCCESS)</div><div>   CGroup: /system.slice/ksm.service</div><div><br></div><div>Apr 11 11:07:28 <a href="http://ov300.datacenter.polimi.it">ov300.datacenter.polimi.it</a> systemd[1]: Starting Kernel Samepage Merging...</div><div>Apr 11 11:07:28 <a href="http://ov300.datacenter.polimi.it">ov300.datacenter.polimi.it</a> systemd[1]: Started Kernel Samepage Merging.</div><div><br></div><div>[g.cecchi@ov300 ~]$ sudo systemctl status ksmtuned</div><div>● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon</div><div>   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; disabled; vendor preset: disabled)</div><div>   Active: inactive (dead)</div><div>[g.cecchi@ov300 ~]$ </div></div><div><br></div><div><br></div><div>b) ballooning enabled for a newly created VM unless I explicitly disable it (at least I see this happens in 4.1.1) </div><div><br></div><div>What to do for a) and b) to not interfere with huge pages?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The hook is being improved right now in master, but it should be<br>
usable in stable too.<br>
<br></blockquote><div><br></div><div>I will be happy to test and verify and contribute to its description, as soon as I understand its usage....</div><div><br></div><div>Gianluca</div></div></div></div>