Hi Nova team,


I'd like to propose a feature enhancement for Nova's libvirt driver, specifically related to memory allocation handling for large-memory virtual machines.


Currently, when deploying VMs with a large memory footprint (e.g., 512GB–2TB) using hugepages or pre-allocated memory, libvirt defaults to on-demand memory allocation unless `<allocation mode='immediate'/>` is explicitly set in the domain XML.


This behavior often results in significant delays in VM boot time due to lazy memory allocation or THP promotion. In our environment, VM startups can take over 5 minutes, and in extreme cases even up to 1 hour, depending on host memory fragmentation and THP overhead.


**Proposal:**

We’d like to enhance the Nova libvirt driver to support configuring memory allocation mode in the generated libvirt XML. This could be controlled via flavor `extra_specs`, image metadata, or nova.conf, and would insert the following XML element when requested:


```xml

<memoryBacking>

  <allocation mode='immediate'/>

</memoryBacking>


We have already implemented a working patch internally, and we are ready to contribute it upstream if the Nova team is open to supporting this enhancement.


Thanks.

donghun Kim


즐거운 하루 되십시요.  

_________________________________________  

김동훈 Kim, Donghun 
프로
SCP Compute아키텍처그룹(클라우드아키텍처)

Senior Engineer / Cloud Architect

T +82-2-6155-4226     M +82-10-9020-8827

E dh8827.kim@samsung.com