SlideShare a Scribd company logo
CSE 598B: Self-* Systems
Memory Resource Management in
VMware ESX Server
by Carl A. Waldspurger
Presented by: Arjun R. Nath
(slide material adapted from C. Waldspurger, and M. Behar)
2
Summary of this Presentation
What is VMware ESX server ?
Virtualization
Memory management techniques employed by
ESX server
– Ballooning
– Memory sharing
– Reclaiming idle memory
Other stuff – similar products, etc.
3
ESX server overview
 Thin kernel designed to run VMs
 Multiplexes hardware resources - virtualizes the Intel IA-32
architecture
 Manages system hardware for high-performance I/O
 Runs unmodified commodity operating systems
4
Virtualization
 Virtualization enables the running of multiple
operating systems on a single machine
 Each Virtual Machine (VM) is isolated and
protected from each other - Illusion of dedicated
physical machine
 Allows an abstraction of server workloads
 Motivation:
– Take advantage of idle machine time
– Easy to maintain and upgrade VMs
5
Memory Virtualization
6
Memory Virtualization
 Guest OS needs to see a zero-based memory
space
 Terms:
– Machine address -> Host hardware memory space
– “Physical” address -> Virtual machine memory
space
7
Memory Virtualization
 Translation from MPN (machine
page numbers) to PPN (physical
page numbers) is done thru a
pmap data structure for each VM
 Shadow page tables are
maintained for virtual-to-
machine translations
– Allows for fast direct VM to Host
address translations
 Easy remapping of PPN-to-MPN
possible transparent to VM
8
Memory Reclamation
9
Memory Reclamation
 Each VM gets a configurable max size of physical
memory
 ESX must handle overcommitted memory per VM
– ESX must choose which VM to revoke memory
from
10
Memory Reclamation
 Traditional: add transparent swap layer
– Requires meta-level page replacement decisions
– Best data to guide decisions known only by guest
OS
– Guest and meta-level policies may clash
 Alternative: implicit cooperation
– Coax guest into doing page replacement
11
Ballooning – a neat trick!
 ESX must do the memory
reclamation with no
information from VM OS
 ESX uses Ballooning to
achieve this
– A balloon module or driver is
loaded into VM OS
– The balloon works on pinned
physical pages in the VM
– “Inflating” the balloon reclaims
memory
– “Deflating” the balloon
releases the allocated pages
12
Ballooning – a neat trick!
ESX server can “coax” a guest OS into releasing some memory
Example of how Ballooning can be employed
13
Ballooning - performance
Throughput of a Linux VM running dbench with 40 clients. The black
bars plot the performance when the VM is configured with main memory
sizes ranging from 128 MB to 256 MB. The gray bars plot the
performance of the same VM configured with 256 MB, ballooned down
to the specified size.
14
Ballooning - limitations
 Ballooning is not available all the time: OS boot time, driver
explicitly disabled
 Ballooning does not respond fast enough for certain situations
 Guest OS might have limitations to upper bound on balloon size
ESX Server preferentially uses ballooning to reclaim memory.
However, when ballooning is not possible or insufficient, the
system falls back to a paging mechanism. Memory is reclaimed
by paging out to an ESX Server swap area on disk, without any
guest involvement.
15
Sharing Memory
16
Sharing Memory - Page Sharing
 ESX Server can exploit the redundancy of data and
instructions across several VMs
– Multiple instances of the same guest OS share many of the
same applications and data
– Sharing across VMs can reduce total memory usage
– Sharing can also increase the level of over-commitment
available for the VMs
Running multiple OSs in VMs on the same machine may
result in multiple copies of the same code and data
being used in the separate VMs. For example, several
VMs are running the same guest OS and have the same
apps or components loaded.
17
Page Sharing
 ESX uses page content to implement sharing
 ESX does not need to modify guest OS to work
 ESX uses hashing to reduce scan comparison
complexity
– A hash value is used to summarize page content
– A hint entry is used to optimize not yet shared
pages
– Hash table content have a COW (copy-on-write) to
make a private copy when they are written too
18
Page Sharing: Scan Candidate PPN
19
Page Sharing: Successful Match
20
Page Sharing - performance
•Best-case. workload.
•Identical Linux VMs.
•SPEC95 benchmarks.
•Lots of potential sharing.
•Metrics
•Total guest PPNs.
•Shared PPNs →67%.
•Saved MPNs →60%.
•Effective sharing
•Negligible overhead
21
Page Sharing - performance
This graph plots the metrics shown earlier as a percentage
of aggregate VM memory. For large numbers of VMs,
sharing approaches 67% and nearly 60% of all VM memory
is reclaimed.
22
Page Sharing - performance
Real-World Page Sharing metrics from production deployments of ESX Server.
(A) 10 Win NT VMs serving users at a Fortune 50 company, running a variety of
DBs (Oracle, SQL Server), web (IIS,Websphere), development (Java, VB), and
other applications.
(B) 9 Linux VMs serving a large user community for a nonprofit organization,
executing a mix of web (Apache), mail (Majordomo, Postfix, POP/IMAP,
MailArmor), and other servers.
(C) 5 Linux VMs providing web proxy (Squid), mail (Postfix, RAV), and remote
access (ssh) services toVMware employees.
23
Resource Allocation
24
Proportional allocation
 ESX allows proportional memory allocation for
VMs
– With maintained memory performance
– With VM isolation
– Admin configurable
25
Proportional allocation
 Resource rights are distributed to clients through
shares
– Clients with more shares get more resources
relative to the total resources in the system
– In overloaded situations client allocation degrades
gracefully
– Proportional-share can be unfair, ESX uses an
“idle memory tax” to overcome this
26
Idle memory tax
 When memory is scarce, clients with idle pages will be penalized
compared to more active ones
 The tax rate specifies the max number of idle pages that can be
reallocated to active clients
– When a idle paging client starts increasing its activity the pages can
be reallocated back to full share
– Idle page cost: k = 1/(1 - tax_rate) with tax_rate: 0 < tax_rate < 1
 ESX statically samples pages in each VM to estimate active
memory usage
 ESX has a default tax rate of .75
 ESX by default samples 100 pages every 30 seconds
27
Idle memory tax
Experiment:
2 VMs, 256 MB, same shares.
VM1: Windows boot+idle.
VM2:Linux boot+dbench.
Solid: usage, Dotted:active.
Change tax rate 0%  75%
After: high tax.
Redistribute VM1→VM2.
VM1 reduced to min size.
VM2 throughput improves 30%
28
Dynamic allocation
 ESX uses thresholds to dynamically allocate
memory to VMs
– ESX has 4 levels from high, soft, hard and low
– The default levels are 6%, 4%, 2% and 1%
– ESX can block a VM when levels are at low
– Rapid state fluctuations are prevented by
changing back to higher level only after higher
threshold is significantly exceeded
29
I/O page remapping
 IA-32 supports PAE to address up to 64GB of
memory over a 36bit address space
 ESX can remap “hot” pages in high “physical”
memory addresses to lower machine addresses
30
Conclusion
 Key features
– Flexible dynamic partitioning
– Efficient support for overcommitted workloads
 Novel mechanisms
– Ballooning leverages guest OS algorithms
– Content-based page sharing
– Proportional-sharing with idle memory tax
31
Similar Products
 VM (IBM), very early, roots in System/360, ’64
–’65
 Bochs, open source emulator.
 Xen, open source VMM, requires changes to
guest OS.
 SIMICS, full system simulator
 VirtualPC (Microsoft)
32
Current status of ESX Server
C. Waldspurger’s Paper - 2002, Today 2005
 Supports enterprise workloads in multi-processor
virtual machines.
 Resource controls for virtual machine CPU,
memory, disk I/O, and network I/O usage.
Supports SLA type guarantees
 Has “VMotion”: Migrate a running VM to a
different physical server connected to the same
storage area network without service interruption
33
That’s all folks,
Thank You.
Ad

More Related Content

What's hot (20)

Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Principled Technologies
 
Virtual Deep-Dive: Citrix Xen Server
Virtual Deep-Dive: Citrix Xen ServerVirtual Deep-Dive: Citrix Xen Server
Virtual Deep-Dive: Citrix Xen Server
Digicomp Academy AG
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine Manager
Tomica Kaniski
 
All about Azure workshop deck
All about Azure workshop deckAll about Azure workshop deck
All about Azure workshop deck
Alexey Bokov
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
Tomica Kaniski
 
Virtualization_TechTalk
Virtualization_TechTalkVirtualization_TechTalk
Virtualization_TechTalk
Arif k
 
OpenQrm
OpenQrmOpenQrm
OpenQrm
Kris Buytaert
 
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld
 
Maxta_MxSP_for_VMware (1)
Maxta_MxSP_for_VMware (1)Maxta_MxSP_for_VMware (1)
Maxta_MxSP_for_VMware (1)
Tarah DiNardo
 
Using openQRM to Manage Virtual Machines
Using openQRM to Manage Virtual MachinesUsing openQRM to Manage Virtual Machines
Using openQRM to Manage Virtual Machines
Kris Buytaert
 
Hyper-V vNext
Hyper-V vNextHyper-V vNext
Hyper-V vNext
Tomica Kaniski
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
Digicomp Academy AG
 
Modern Data Protection
Modern Data ProtectionModern Data Protection
Modern Data Protection
subtitle
 
Open Cloud BBQ - Nano Server
Open Cloud BBQ - Nano ServerOpen Cloud BBQ - Nano Server
Open Cloud BBQ - Nano Server
Tomica Kaniski
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
Виталий Стародубцев
 
Citrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 TroubleshootingCitrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 Troubleshooting
Thomas Krampe
 
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with DockerSCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
Kenny Buntinx
 
Docker ppt
Docker pptDocker ppt
Docker ppt
Bhanuchander Udhayakumar
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
Lahiru Danushka
 
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Accelerating virtualized Oracle 12c performance with vSphere 5.5 advanced fea...
Principled Technologies
 
Virtual Deep-Dive: Citrix Xen Server
Virtual Deep-Dive: Citrix Xen ServerVirtual Deep-Dive: Citrix Xen Server
Virtual Deep-Dive: Citrix Xen Server
Digicomp Academy AG
 
VMware Performance Troubleshooting
VMware Performance TroubleshootingVMware Performance Troubleshooting
VMware Performance Troubleshooting
glbsolutions
 
What's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine ManagerWhat's new in System Center 2012 R2: Virtual Machine Manager
What's new in System Center 2012 R2: Virtual Machine Manager
Tomica Kaniski
 
All about Azure workshop deck
All about Azure workshop deckAll about Azure workshop deck
All about Azure workshop deck
Alexey Bokov
 
Virtualization_TechTalk
Virtualization_TechTalkVirtualization_TechTalk
Virtualization_TechTalk
Arif k
 
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld 2013: Capacity Jail Break: vSphere 5 Space Reclamation Nuts and Bolts
VMworld
 
Maxta_MxSP_for_VMware (1)
Maxta_MxSP_for_VMware (1)Maxta_MxSP_for_VMware (1)
Maxta_MxSP_for_VMware (1)
Tarah DiNardo
 
Using openQRM to Manage Virtual Machines
Using openQRM to Manage Virtual MachinesUsing openQRM to Manage Virtual Machines
Using openQRM to Manage Virtual Machines
Kris Buytaert
 
12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced12 christian ferber xen_server_advanced
12 christian ferber xen_server_advanced
Digicomp Academy AG
 
Modern Data Protection
Modern Data ProtectionModern Data Protection
Modern Data Protection
subtitle
 
Open Cloud BBQ - Nano Server
Open Cloud BBQ - Nano ServerOpen Cloud BBQ - Nano Server
Open Cloud BBQ - Nano Server
Tomica Kaniski
 
Секреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-VСекреты виртуализации - Windows Server 2012 Hyper-V
Секреты виртуализации - Windows Server 2012 Hyper-V
Виталий Стародубцев
 
Citrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 TroubleshootingCitrix XenServer 5.5 Troubleshooting
Citrix XenServer 5.5 Troubleshooting
Thomas Krampe
 
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with DockerSCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
SCUGBE_Lowlands_Unite_2017_Managing Windows Containers with Docker
Kenny Buntinx
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
Lahiru Danushka
 

Similar to Memory virtualisation (20)

Memory Management In Vmware Esx Server
Memory Management In Vmware Esx ServerMemory Management In Vmware Esx Server
Memory Management In Vmware Esx Server
Kashif Dayo
 
Esx mem-osdi02
Esx mem-osdi02Esx mem-osdi02
Esx mem-osdi02
35146895
 
More on Virtualization 3.pptx
More on Virtualization 3.pptxMore on Virtualization 3.pptx
More on Virtualization 3.pptx
shruti533256
 
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
virtualization (1).pdf bbbbbbbnnnnnjnjjjjjvirtualization (1).pdf bbbbbbbnnnnnjnjjjjj
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
girisaksham3
 
IaaS - Virtualization_Cambridge.pdf
IaaS - Virtualization_Cambridge.pdfIaaS - Virtualization_Cambridge.pdf
IaaS - Virtualization_Cambridge.pdf
DharavathRamesh2
 
Esxi troubleshooting
Esxi troubleshootingEsxi troubleshooting
Esxi troubleshooting
Ovi Chis
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
9260SahilPatil
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
9260SahilPatil
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
4173CarreonIraMaeL
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
XdemonGraphicz
 
Virtualization.ppt
Virtualization.pptVirtualization.ppt
Virtualization.ppt
UbaidURRahman78
 
VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld 2013: Successfully Virtualize Microsoft Exchange Server VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld
 
Operating System extension.docx
Operating System extension.docxOperating System extension.docx
Operating System extension.docx
kumari36
 
Virtualization and how it leads to cloud
Virtualization and how it leads to cloudVirtualization and how it leads to cloud
Virtualization and how it leads to cloud
Huzefa Husain
 
Hyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the DifferencesHyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the Differences
SolarWinds
 
Presentation v mware performance overview
Presentation   v mware performance overviewPresentation   v mware performance overview
Presentation v mware performance overview
solarisyourep
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
Alan Renouf
 
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFERCC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
2021ismadhuprasadrna
 
vSphere
vSpherevSphere
vSphere
Gloster telekom Kft.
 
Exchange 2010 New England Vmug
Exchange 2010 New England VmugExchange 2010 New England Vmug
Exchange 2010 New England Vmug
csharney
 
Memory Management In Vmware Esx Server
Memory Management In Vmware Esx ServerMemory Management In Vmware Esx Server
Memory Management In Vmware Esx Server
Kashif Dayo
 
Esx mem-osdi02
Esx mem-osdi02Esx mem-osdi02
Esx mem-osdi02
35146895
 
More on Virtualization 3.pptx
More on Virtualization 3.pptxMore on Virtualization 3.pptx
More on Virtualization 3.pptx
shruti533256
 
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
virtualization (1).pdf bbbbbbbnnnnnjnjjjjjvirtualization (1).pdf bbbbbbbnnnnnjnjjjjj
virtualization (1).pdf bbbbbbbnnnnnjnjjjjj
girisaksham3
 
IaaS - Virtualization_Cambridge.pdf
IaaS - Virtualization_Cambridge.pdfIaaS - Virtualization_Cambridge.pdf
IaaS - Virtualization_Cambridge.pdf
DharavathRamesh2
 
Esxi troubleshooting
Esxi troubleshootingEsxi troubleshooting
Esxi troubleshooting
Ovi Chis
 
VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld 2013: Successfully Virtualize Microsoft Exchange Server VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld 2013: Successfully Virtualize Microsoft Exchange Server
VMworld
 
Operating System extension.docx
Operating System extension.docxOperating System extension.docx
Operating System extension.docx
kumari36
 
Virtualization and how it leads to cloud
Virtualization and how it leads to cloudVirtualization and how it leads to cloud
Virtualization and how it leads to cloud
Huzefa Husain
 
Hyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the DifferencesHyper-V vs. vSphere: Understanding the Differences
Hyper-V vs. vSphere: Understanding the Differences
SolarWinds
 
Presentation v mware performance overview
Presentation   v mware performance overviewPresentation   v mware performance overview
Presentation v mware performance overview
solarisyourep
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
Alan Renouf
 
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFERCC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
CC CLOUD RESOURCE VIRTUALIZATION PPT TO REFER
2021ismadhuprasadrna
 
Exchange 2010 New England Vmug
Exchange 2010 New England VmugExchange 2010 New England Vmug
Exchange 2010 New England Vmug
csharney
 
Ad

More from Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
Kumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 
region-filling
region-fillingregion-filling
region-filling
Kumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
Kumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
Kumar
 
Xml basics
Xml basicsXml basics
Xml basics
Kumar
 
XML Schema
XML SchemaXML Schema
XML Schema
Kumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
Kumar
 
DTD
DTDDTD
DTD
Kumar
 
Applying xml
Applying xmlApplying xml
Applying xml
Kumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
Kumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
Kumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
Kumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
Kumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
Kumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
Kumar
 
Graphics devices
Graphics devicesGraphics devices
Graphics devices
Kumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 
region-filling
region-fillingregion-filling
region-filling
Kumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
Kumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
Kumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
Kumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
Kumar
 
Xml basics
Xml basicsXml basics
Xml basics
Kumar
 
XML Schema
XML SchemaXML Schema
XML Schema
Kumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
Kumar
 
Applying xml
Applying xmlApplying xml
Applying xml
Kumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 
How to deploy a j2ee application
How to deploy a j2ee applicationHow to deploy a j2ee application
How to deploy a j2ee application
Kumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
Kumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
Kumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
Kumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
Kumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
Kumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
Kumar
 
Ad

Recently uploaded (20)

TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 

Memory virtualisation

  • 1. CSE 598B: Self-* Systems Memory Resource Management in VMware ESX Server by Carl A. Waldspurger Presented by: Arjun R. Nath (slide material adapted from C. Waldspurger, and M. Behar)
  • 2. 2 Summary of this Presentation What is VMware ESX server ? Virtualization Memory management techniques employed by ESX server – Ballooning – Memory sharing – Reclaiming idle memory Other stuff – similar products, etc.
  • 3. 3 ESX server overview  Thin kernel designed to run VMs  Multiplexes hardware resources - virtualizes the Intel IA-32 architecture  Manages system hardware for high-performance I/O  Runs unmodified commodity operating systems
  • 4. 4 Virtualization  Virtualization enables the running of multiple operating systems on a single machine  Each Virtual Machine (VM) is isolated and protected from each other - Illusion of dedicated physical machine  Allows an abstraction of server workloads  Motivation: – Take advantage of idle machine time – Easy to maintain and upgrade VMs
  • 6. 6 Memory Virtualization  Guest OS needs to see a zero-based memory space  Terms: – Machine address -> Host hardware memory space – “Physical” address -> Virtual machine memory space
  • 7. 7 Memory Virtualization  Translation from MPN (machine page numbers) to PPN (physical page numbers) is done thru a pmap data structure for each VM  Shadow page tables are maintained for virtual-to- machine translations – Allows for fast direct VM to Host address translations  Easy remapping of PPN-to-MPN possible transparent to VM
  • 9. 9 Memory Reclamation  Each VM gets a configurable max size of physical memory  ESX must handle overcommitted memory per VM – ESX must choose which VM to revoke memory from
  • 10. 10 Memory Reclamation  Traditional: add transparent swap layer – Requires meta-level page replacement decisions – Best data to guide decisions known only by guest OS – Guest and meta-level policies may clash  Alternative: implicit cooperation – Coax guest into doing page replacement
  • 11. 11 Ballooning – a neat trick!  ESX must do the memory reclamation with no information from VM OS  ESX uses Ballooning to achieve this – A balloon module or driver is loaded into VM OS – The balloon works on pinned physical pages in the VM – “Inflating” the balloon reclaims memory – “Deflating” the balloon releases the allocated pages
  • 12. 12 Ballooning – a neat trick! ESX server can “coax” a guest OS into releasing some memory Example of how Ballooning can be employed
  • 13. 13 Ballooning - performance Throughput of a Linux VM running dbench with 40 clients. The black bars plot the performance when the VM is configured with main memory sizes ranging from 128 MB to 256 MB. The gray bars plot the performance of the same VM configured with 256 MB, ballooned down to the specified size.
  • 14. 14 Ballooning - limitations  Ballooning is not available all the time: OS boot time, driver explicitly disabled  Ballooning does not respond fast enough for certain situations  Guest OS might have limitations to upper bound on balloon size ESX Server preferentially uses ballooning to reclaim memory. However, when ballooning is not possible or insufficient, the system falls back to a paging mechanism. Memory is reclaimed by paging out to an ESX Server swap area on disk, without any guest involvement.
  • 16. 16 Sharing Memory - Page Sharing  ESX Server can exploit the redundancy of data and instructions across several VMs – Multiple instances of the same guest OS share many of the same applications and data – Sharing across VMs can reduce total memory usage – Sharing can also increase the level of over-commitment available for the VMs Running multiple OSs in VMs on the same machine may result in multiple copies of the same code and data being used in the separate VMs. For example, several VMs are running the same guest OS and have the same apps or components loaded.
  • 17. 17 Page Sharing  ESX uses page content to implement sharing  ESX does not need to modify guest OS to work  ESX uses hashing to reduce scan comparison complexity – A hash value is used to summarize page content – A hint entry is used to optimize not yet shared pages – Hash table content have a COW (copy-on-write) to make a private copy when they are written too
  • 18. 18 Page Sharing: Scan Candidate PPN
  • 20. 20 Page Sharing - performance •Best-case. workload. •Identical Linux VMs. •SPEC95 benchmarks. •Lots of potential sharing. •Metrics •Total guest PPNs. •Shared PPNs →67%. •Saved MPNs →60%. •Effective sharing •Negligible overhead
  • 21. 21 Page Sharing - performance This graph plots the metrics shown earlier as a percentage of aggregate VM memory. For large numbers of VMs, sharing approaches 67% and nearly 60% of all VM memory is reclaimed.
  • 22. 22 Page Sharing - performance Real-World Page Sharing metrics from production deployments of ESX Server. (A) 10 Win NT VMs serving users at a Fortune 50 company, running a variety of DBs (Oracle, SQL Server), web (IIS,Websphere), development (Java, VB), and other applications. (B) 9 Linux VMs serving a large user community for a nonprofit organization, executing a mix of web (Apache), mail (Majordomo, Postfix, POP/IMAP, MailArmor), and other servers. (C) 5 Linux VMs providing web proxy (Squid), mail (Postfix, RAV), and remote access (ssh) services toVMware employees.
  • 24. 24 Proportional allocation  ESX allows proportional memory allocation for VMs – With maintained memory performance – With VM isolation – Admin configurable
  • 25. 25 Proportional allocation  Resource rights are distributed to clients through shares – Clients with more shares get more resources relative to the total resources in the system – In overloaded situations client allocation degrades gracefully – Proportional-share can be unfair, ESX uses an “idle memory tax” to overcome this
  • 26. 26 Idle memory tax  When memory is scarce, clients with idle pages will be penalized compared to more active ones  The tax rate specifies the max number of idle pages that can be reallocated to active clients – When a idle paging client starts increasing its activity the pages can be reallocated back to full share – Idle page cost: k = 1/(1 - tax_rate) with tax_rate: 0 < tax_rate < 1  ESX statically samples pages in each VM to estimate active memory usage  ESX has a default tax rate of .75  ESX by default samples 100 pages every 30 seconds
  • 27. 27 Idle memory tax Experiment: 2 VMs, 256 MB, same shares. VM1: Windows boot+idle. VM2:Linux boot+dbench. Solid: usage, Dotted:active. Change tax rate 0%  75% After: high tax. Redistribute VM1→VM2. VM1 reduced to min size. VM2 throughput improves 30%
  • 28. 28 Dynamic allocation  ESX uses thresholds to dynamically allocate memory to VMs – ESX has 4 levels from high, soft, hard and low – The default levels are 6%, 4%, 2% and 1% – ESX can block a VM when levels are at low – Rapid state fluctuations are prevented by changing back to higher level only after higher threshold is significantly exceeded
  • 29. 29 I/O page remapping  IA-32 supports PAE to address up to 64GB of memory over a 36bit address space  ESX can remap “hot” pages in high “physical” memory addresses to lower machine addresses
  • 30. 30 Conclusion  Key features – Flexible dynamic partitioning – Efficient support for overcommitted workloads  Novel mechanisms – Ballooning leverages guest OS algorithms – Content-based page sharing – Proportional-sharing with idle memory tax
  • 31. 31 Similar Products  VM (IBM), very early, roots in System/360, ’64 –’65  Bochs, open source emulator.  Xen, open source VMM, requires changes to guest OS.  SIMICS, full system simulator  VirtualPC (Microsoft)
  • 32. 32 Current status of ESX Server C. Waldspurger’s Paper - 2002, Today 2005  Supports enterprise workloads in multi-processor virtual machines.  Resource controls for virtual machine CPU, memory, disk I/O, and network I/O usage. Supports SLA type guarantees  Has “VMotion”: Migrate a running VM to a different physical server connected to the same storage area network without service interruption

Editor's Notes

  • #3: The motivation of this paper comes from two growing trends. First, the cost and complexity of system management is leading numerous enterprises to offload their IT demands to hosting/data centers. Each hosting center operates thousands of servers and provide service to large number of applications to achieve performance service level agreement (SLA).