BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//pretalx//pretalx.com//kvm-forum-2024//speaker//VLS7H3
BEGIN:VTIMEZONE
TZID:CET
BEGIN:STANDARD
DTSTART:20001029T040000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20000326T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:pretalx-kvm-forum-2024-A3S9DF@pretalx.com
DTSTART;TZID=CET:20240922T151500
DTEND;TZID=CET:20240922T154500
DESCRIPTION:Linux virtualization environments support memory overcommitment
  for VMs using techniques such as host-based swapping and ballooning. Ball
 ooning is not a complete solution\, and we have observed significant perfo
 rmance bottlenecks with the native Linux swap system. Swapping also degrad
 es live migration performance\, since QEMU reads a VM’s entire address s
 pace\, including  swapped-out pages that must be faulted in to migrate the
 ir data. QEMU accesses to pages during live migration also pollute the act
 ive working set of the VM process\, causing unnecessary thrashing. As a re
 sult\,  both guest performance and live migration times can be severely im
 pacted by native Linux memory overcommitment.\nThese problems motivated us
  to develop a custom memory manager (external to QEMU) for VM memory. We p
 ropose leveraging UserfaultFD to take full control of the VM memory space 
 via an external memory manager process\, exposed to QEMU as a new memory b
 ackend. QEMU requests memory from this external service and registers the 
 userfaultFD of shared memory address spaces with the memory manager proces
 s. This approach allows us to implement a lightweight swap system that can
  take advantage of a multi-level hierarchy of swap devices with different 
 latencies that can be leveraged to improve performance. More generally\, g
 aining control over guest memory enables a wide range of additional optimi
 zations as future work.\nThis approach also offers significant opportuniti
 es to improve live migration.  With full visibility into the swap state of
  guest physical memory\, we can avoid costly accesses to swapped-out pages
 \, skipping over them during live migration.  By using shared remote stora
 ge accessible to both the source and destination hosts\, we transfer only 
 their swap locations\, instead of their page contents. This eliminates the
  page faults associated with swapped-out pages\, and also reduces pollutio
 n of the guest's active working set.\nWe will present the design and imple
 mentation of our prototype userfaultFD-based memory overcommitment system\
 , and explain how it interoperates with QEMU for effective VM memory manag
 ement.  We will also demonstrate its improved performance on several VM wo
 rkloads\, and discuss various tradeoffs and areas for future improvement.
DTSTAMP:20260305T203810Z
LOCATION:Hall A+B
SUMMARY:UserfaultFD-based Memory Overcommitment - Tejus GK\, Manish Mishra\
 , Rohit Kumar
URL:https://pretalx.com/kvm-forum-2024/talk/A3S9DF/
END:VEVENT
END:VCALENDAR
