SlideShare a Scribd company logo
HISILICON SEMICONDUCTORHuawei Confidential
Page 1
HUAWEI TECHNOLOGIES CO., LTD.
Memory Overcommitment in XEN
June, 2018
Zhichao Huang <huangzhichao@huawei.com>
Agenda
• Use cases
• Issues & Proposals
• Summary
What is memory overcomitment
• Allows users to power on virtual machines (VMs) with a total
configured memory that exceeds the memory available on the
physical machine.
Currently, we use it for:
– More than 1000 key customers, 100,000 + VMs
– More then 150% overcommitment ratio
– More than one year without any bugs
Use cases
• Higher consolidation ratio
– Traditional business clouding – Old physical machine and same memory size
– server virtualization – All VMs with large memory size, to avoid
serious waste of resource
– scenario under low loads – VDI, Web service, improve resource utilization
• Dynamic resource scheduling
– high availability
– distributed power management
– Software/Hardware upgrades - increase the concurrency of live migration
How to do it
• Memory Popluate on Demand
– Basic technique
– Not useful only by itself
– POD reclaim in Hypervisor is too expensive
• Memory Ballooning
– Requires a driver inside VMs
– Must use it carefully
• Memory Sharing
– Stable and effective
– Works well most of the time
Memory Ballooning
VM1 VM2
Balloon
Free
Used
Used
Free
Memory Sharing
VM1 VM2 VM3
Physical Memory
How to do it
• Memory Swapping
– Guaranteed, in an emergency
– Disk I/O speed is the key point
• Memory Compression
– A nice toy
• Memory Overcommitment Policy
– When, What, How
– Memory Qos (Reservation, shares, limit)
Memory Swapping
Disk
VM VM
Memory Overcommitment scalability
• Lots of optimization in upstream
– Use unlocked p2m lookups in hvmemul_rep_movs
– Defer the invalidation until the p2m lock is released
– Use per-cpu lock instead of global shr-lock
– ……
• Some other optimization from Huawei
– Frequent ipi to invalidate ept on related pCPUs
– Global calllock -> per-cpu lock
– Ticket lock -> mcs lock(scalable lock)
– ……
Evaluation Results
With the optimization, the number of lock wait and each wait consuming are both reduced significantly
With other feature
• With migration / Snapshot / Hiberate
– Time consumption is reduced to 1/3 or less
• With Guest Dump
– Time consumption is reduced to 1/2 or less
• With Device Passthrough
– Full memory reservation automaticly
• ……
Summary
• Use cases
• Stability
• Performance
• Scalability
• Compatibility
Thank you
www.huawei.com

More Related Content

PDF
XPDDS18: Performance tuning on Xen platform - Bo Zhang & Yifei Jiang, Huawei
PDF
XPDDS18: The Art of Virtualizing Cache Maintenance - Julien Grall, Arm
PDF
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
PDF
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
PDF
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
PPTX
Demand-Based Coordinated Scheduling for SMP VMs
PPSX
Redesigning Xen Memory Sharing (Grant) Mechanism
PDF
XPDS13: Enabling Fast, Dynamic Network Processing with ClickOS - Joao Martins...
XPDDS18: Performance tuning on Xen platform - Bo Zhang & Yifei Jiang, Huawei
XPDDS18: The Art of Virtualizing Cache Maintenance - Julien Grall, Arm
XPDDS18: NVDIMM Overview - George Dunlap, Citrix
XPDDS18: Xenwatch Multithreading - Dongli Zhang, Oracle
XPDDS18: CPUFreq in Xen on ARM - Oleksandr Tyshchenko, EPAM Systems
Demand-Based Coordinated Scheduling for SMP VMs
Redesigning Xen Memory Sharing (Grant) Mechanism
XPDS13: Enabling Fast, Dynamic Network Processing with ClickOS - Joao Martins...

What's hot (20)

PDF
Xen Memory Management
PDF
XPDS13: In-Guest Mechanism to Strengthen Guest Separation - Philip Tricca, Ci...
PDF
XS Boston 2008 Quantitative
PDF
KVM Tuning @ eBay
PPTX
Building a KVM-based Hypervisor for a Heterogeneous System Architecture Compl...
PPTX
2. OS vs. VMM
PDF
XPDDS18: Introducing ViryaOS: Secure Containers for Embedded and IoT - Stefan...
ODP
Disk Performance Comparison Xen v.s. KVM
PDF
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
PPTX
3. CPU virtualization and scheduling
PDF
XPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
PDF
XPDS13: Performance Evaluation of Live Migration based on Xen ARM PVH - Jaeyo...
PPTX
CPU Scheduling for Virtual Desktop Infrastructure
PDF
OWF: Xen - Open Source Hypervisor Designed for Clouds
PPTX
LinuxCon Japan 13 : 10 years of Xen and Beyond
PDF
ARM-KVM: Weather Report
PDF
PVH : PV Guest in HVM container
PDF
Enhanced Live Migration for Intensive Memory Loads
PPTX
5. IO virtualization
PDF
Memory Virtualization
Xen Memory Management
XPDS13: In-Guest Mechanism to Strengthen Guest Separation - Philip Tricca, Ci...
XS Boston 2008 Quantitative
KVM Tuning @ eBay
Building a KVM-based Hypervisor for a Heterogeneous System Architecture Compl...
2. OS vs. VMM
XPDDS18: Introducing ViryaOS: Secure Containers for Embedded and IoT - Stefan...
Disk Performance Comparison Xen v.s. KVM
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
3. CPU virtualization and scheduling
XPDS13: Xen on ARM Update - Stefano Stabellini, Citrix
XPDS13: Performance Evaluation of Live Migration based on Xen ARM PVH - Jaeyo...
CPU Scheduling for Virtual Desktop Infrastructure
OWF: Xen - Open Source Hypervisor Designed for Clouds
LinuxCon Japan 13 : 10 years of Xen and Beyond
ARM-KVM: Weather Report
PVH : PV Guest in HVM container
Enhanced Live Migration for Intensive Memory Loads
5. IO virtualization
Memory Virtualization
Ad

Similar to XPDDS18: Memory Overcommitment in XEN - Huang Zhichao, Huawei (20)

PDF
Evaluation and Enhancement to Memory Sharing and Swapping in Xen 4.1
PDF
XS Boston 2008 Memory Overcommit
PPTX
VMworld 2015: Extreme Performance Series - vSphere Compute & Memory
PDF
The Lies We Tell Our Code (#seascale 2015 04-22)
PDF
VMware vSphere memory overcommitment delivered greater VM density than Red Ha...
PPTX
IMCSummit 2016 Keynote - Benzi Galili - More Memory for In-Memory Easy
PDF
Run more VMs and get better performance with VMware vSphere 8
PDF
Presentation v mware v-sphere advanced troubleshooting by eric sloof
PDF
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
PDF
Advancedtroubleshooting 101208145718-phpapp01
PDF
Esx mem-osdi02
PDF
Vmware vsphere taking_a_trip_down_memory_lane
PPTX
Hyper-V Dynamic Memory in Depth
PDF
XS Oracle 2009 Transcendent Memory
PPTX
4. Memory virtualization and management
PDF
Virtualization with Lenovo X6 Blade Servers: white paper
PPTX
Virtualisation Oversubscription - What's so scary?
PDF
Presentation v mware performance overview
PDF
The have no fear guide to virtualizing databases
PPTX
VDI Design Guide
Evaluation and Enhancement to Memory Sharing and Swapping in Xen 4.1
XS Boston 2008 Memory Overcommit
VMworld 2015: Extreme Performance Series - vSphere Compute & Memory
The Lies We Tell Our Code (#seascale 2015 04-22)
VMware vSphere memory overcommitment delivered greater VM density than Red Ha...
IMCSummit 2016 Keynote - Benzi Galili - More Memory for In-Memory Easy
Run more VMs and get better performance with VMware vSphere 8
Presentation v mware v-sphere advanced troubleshooting by eric sloof
The lies we tell our code, LinuxCon/CloudOpen 2015-08-18
Advancedtroubleshooting 101208145718-phpapp01
Esx mem-osdi02
Vmware vsphere taking_a_trip_down_memory_lane
Hyper-V Dynamic Memory in Depth
XS Oracle 2009 Transcendent Memory
4. Memory virtualization and management
Virtualization with Lenovo X6 Blade Servers: white paper
Virtualisation Oversubscription - What's so scary?
Presentation v mware performance overview
The have no fear guide to virtualizing databases
VDI Design Guide
Ad

More from The Linux Foundation (20)

PDF
ELC2019: Static Partitioning Made Simple
PDF
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
PDF
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
PDF
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
PDF
XPDDS19 Keynote: Unikraft Weather Report
PDF
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
PDF
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
PDF
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
PDF
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
PPTX
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
PPTX
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
PDF
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
PDF
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
PDF
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
PDF
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
PDF
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
PDF
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
PDF
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
PDF
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
PDF
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
ELC2019: Static Partitioning Made Simple
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Cloud computing and distributed systems.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Cloud computing and distributed systems.
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf

XPDDS18: Memory Overcommitment in XEN - Huang Zhichao, Huawei

  • 1. HISILICON SEMICONDUCTORHuawei Confidential Page 1 HUAWEI TECHNOLOGIES CO., LTD. Memory Overcommitment in XEN June, 2018 Zhichao Huang <huangzhichao@huawei.com>
  • 2. Agenda • Use cases • Issues & Proposals • Summary
  • 3. What is memory overcomitment • Allows users to power on virtual machines (VMs) with a total configured memory that exceeds the memory available on the physical machine. Currently, we use it for: – More than 1000 key customers, 100,000 + VMs – More then 150% overcommitment ratio – More than one year without any bugs
  • 4. Use cases • Higher consolidation ratio – Traditional business clouding – Old physical machine and same memory size – server virtualization – All VMs with large memory size, to avoid serious waste of resource – scenario under low loads – VDI, Web service, improve resource utilization • Dynamic resource scheduling – high availability – distributed power management – Software/Hardware upgrades - increase the concurrency of live migration
  • 5. How to do it • Memory Popluate on Demand – Basic technique – Not useful only by itself – POD reclaim in Hypervisor is too expensive • Memory Ballooning – Requires a driver inside VMs – Must use it carefully • Memory Sharing – Stable and effective – Works well most of the time Memory Ballooning VM1 VM2 Balloon Free Used Used Free Memory Sharing VM1 VM2 VM3 Physical Memory
  • 6. How to do it • Memory Swapping – Guaranteed, in an emergency – Disk I/O speed is the key point • Memory Compression – A nice toy • Memory Overcommitment Policy – When, What, How – Memory Qos (Reservation, shares, limit) Memory Swapping Disk VM VM
  • 7. Memory Overcommitment scalability • Lots of optimization in upstream – Use unlocked p2m lookups in hvmemul_rep_movs – Defer the invalidation until the p2m lock is released – Use per-cpu lock instead of global shr-lock – …… • Some other optimization from Huawei – Frequent ipi to invalidate ept on related pCPUs – Global calllock -> per-cpu lock – Ticket lock -> mcs lock(scalable lock) – ……
  • 8. Evaluation Results With the optimization, the number of lock wait and each wait consuming are both reduced significantly
  • 9. With other feature • With migration / Snapshot / Hiberate – Time consumption is reduced to 1/3 or less • With Guest Dump – Time consumption is reduced to 1/2 or less • With Device Passthrough – Full memory reservation automaticly • ……
  • 10. Summary • Use cases • Stability • Performance • Scalability • Compatibility