Thank you for the nice explanation. Looks like there isn't any issue to just enable HugePage in general if ignoring the overcommit senario.
On Wed, 2023-11-01 at 10:39 -0400, Satish Patel wrote:
> Folks,
>
> What are the advantages and disadvantages to enable HugePages on compute
> nodes? I know that HugePages improve performance of VMs because of TLB
> lookup etc. But if it does improve in most cases then why people why
> default not turning on HugePage for deployment?
using hugepages means no memory over commit.
that is the main disadvantage
the other implications is that the memory cannot be swapped
that is the other way that hugepages boost performance
finally hugepages make vms numa affiend. some peopel just dont want
to deal with numa and the numa afifnity implciatieons for sriov
you can disabel numa affinity for sriov device but we default to requiring it
if its a numa vm.
in genreal if you dont need over commit there is no reason not to use hugepages
in a relitively recent cloud. we added live migraiton support 3 or 4 years ago
before that lack of live migration was anohter reason not to use it.
>
> Just trying to find out what could go wrong if I turn on by default
> HugePage for all deployment?
nothing really that im aware of. many telco cloud do this and its the norm for
any NFV workload in most turning guides.
the main implication as an operator is just that you are opting out of memory overcommit
if you dont use that anyway then there really isnt a downside anymore.