SlideShare a Scribd company logo
1 of 1
Download to read offline
Guest Transparent Dynamic Memory Balancing
                                       in Virtual Machines
                                                 Changwoo Min, Inhyuk Kim, Taehyoung Kim, Young Ik Eom



                             Motivation                                                          Monitoring Guest Swapping
Memory could be a bottleneck in server consolidation.                            Why do we need it?
 - It is difficult to share among guest,                                          - In order to estimate memory demand larger
   because it is a non-renewable resource.                                          than the current memory allocation
 - Efficient memory management scheme is needed                                       Guest physical access monitoring cannot reflect demand
   to balance memory allocation according to demand                                     beyond its allocated memory size.
   of each guest.
                                                                                 How to monitor swapping in a guest transparent way
Previous studies have limitations.                                                - Use para-virtualized swap device
 - Estimation of memory demand is limited.                                           Backend driver in QEMU handles actual swapping operation.
 - Cannot work with hardware nested paging, Intel EPT.                            - Update page list and LRU histogram to reflect memory
 - Need to modify guest OS.                                                         demand larger than the current allocation size.
                                                                                                Guest Kernel                                     QEMU



                                                                                              Swap Subsystem                                 Block Device
                                    Goal                                                             Swap
                                                                                                                                              Emulation
                                                                                                                                                 Swap
                                                                                               Front-end Driver                             Back-end Driver

Dynamic memory balancing scheme that does not require                                    guest                 Host Kernel/Hypervisor
modifying guest OS.                                                                      swap in/out
                                                                                                                                                                   block
                                                                                                                                            VMM
                                                                                                                                            swap in/out            I/O
                                                                                                                                               VMM



                           Key Techniques                                                                                                             Swap File




Working Set Size Estimation                                                      VMM swapping without double paging
 - Estimation Model: LRU histogram                                                - VMM swapping is need to cope with delayed memory
 - Monitoring Page Access                                                           reclamation of ballooning technique.
    hardware nested paging                                                       - Double paging could decrease performance significantly
 - Monitoring Guest Swapping                                                        when a guest tries to swap out a page that is already
    paravirtualized swap device                                                    swapped out by VMM. A page should be swapped in
                                                                                    by VMM for a guest to swap out.
Rebalancing Memory Allocation                                                      Swap back-end device is shared between guest and VMM.
 - Guest Page Reclaiming: ballooning technique                                        In such double paging case, swap back-end driver omits
                                                                                      block I/O and just updates sector mapping table.
                                                                                         Guest Kernel                                    QEMU

                   Monitoring Page Access                                              Guest Page Table
                                                                                                                                          Guest Swap Radix Tree
                                                                                                                                          <Guest Page Slot Number,
                                                                                                                                          Physical Page Slot Number>


                                                                                                                                          GFN Hash Table
Guest Physical Page Access                                                                                                                <Guest Physical Frame Number,
                                                                                                …                                         Physical Page Slot Number>
 - Turns off presence bit in a nested page table entry for a page                                       …
                                                                                       PTE of swapped-out
 - Monitors a nested page fault and update LRU histogram                               page is marked as
                                                                                       swapped out page ID.
                                                                                                                                          Allocation Bitmap

  Update page list and LRU histogram                                                                                                     Page Slot Allocation Status



                                                                                                              Host Kernel/Hypervisor
Reducing Monitoring Overhead                                                           Nested Page Table                                                     Page List
 - Do NOT monitor some number of hot pages
   that could be accessed soon                                                                  …
                                                                                                              PTE of swapped-out Hot List Warm List
                                                                                                              page is invalidated.
                                                                                                                                                             Cold List


    Dynamically adjusting the number of hot pages                                                      …
       considering tradeoff between overhead and accuracy
 - Use extended red-black tree to calculate LRU stack distance
   in logarithmic time
                                                                                           Rebalancing Memory Allocation
                            nested page fault                                    New Memory Allocation Size
                                                                                  - A working set size is estimated from its LRU histogram.
                                                                                  - Allocation size is proportionally determined over total
                                                                                    estimated working set size for all guests.
                                                                                 Reclaiming Memory from Guests
                                                                                  - Send ballooning request for a guest to give free memory back

          Hot List                Warm List                Cold List
                                                                                                        For Further Information
        (not monitored)            (monitored)        (monitored, swapped-out)




                                                                                 Please, contact Changwoo Min (multics69@ece.skku.ac.kr)

More Related Content

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Guest Transparent Dynamic Memory Balancing in Virtual Machines

  • 1. Guest Transparent Dynamic Memory Balancing in Virtual Machines Changwoo Min, Inhyuk Kim, Taehyoung Kim, Young Ik Eom Motivation Monitoring Guest Swapping Memory could be a bottleneck in server consolidation. Why do we need it? - It is difficult to share among guest, - In order to estimate memory demand larger because it is a non-renewable resource. than the current memory allocation - Efficient memory management scheme is needed  Guest physical access monitoring cannot reflect demand to balance memory allocation according to demand beyond its allocated memory size. of each guest. How to monitor swapping in a guest transparent way Previous studies have limitations. - Use para-virtualized swap device - Estimation of memory demand is limited.  Backend driver in QEMU handles actual swapping operation. - Cannot work with hardware nested paging, Intel EPT. - Update page list and LRU histogram to reflect memory - Need to modify guest OS. demand larger than the current allocation size. Guest Kernel QEMU Swap Subsystem Block Device Goal Swap Emulation Swap Front-end Driver Back-end Driver Dynamic memory balancing scheme that does not require guest Host Kernel/Hypervisor modifying guest OS. swap in/out block VMM swap in/out I/O VMM Key Techniques Swap File Working Set Size Estimation VMM swapping without double paging - Estimation Model: LRU histogram - VMM swapping is need to cope with delayed memory - Monitoring Page Access reclamation of ballooning technique.  hardware nested paging - Double paging could decrease performance significantly - Monitoring Guest Swapping when a guest tries to swap out a page that is already  paravirtualized swap device swapped out by VMM. A page should be swapped in by VMM for a guest to swap out. Rebalancing Memory Allocation  Swap back-end device is shared between guest and VMM. - Guest Page Reclaiming: ballooning technique In such double paging case, swap back-end driver omits block I/O and just updates sector mapping table. Guest Kernel QEMU Monitoring Page Access Guest Page Table Guest Swap Radix Tree <Guest Page Slot Number, Physical Page Slot Number> GFN Hash Table Guest Physical Page Access <Guest Physical Frame Number, … Physical Page Slot Number> - Turns off presence bit in a nested page table entry for a page … PTE of swapped-out - Monitors a nested page fault and update LRU histogram page is marked as swapped out page ID. Allocation Bitmap  Update page list and LRU histogram Page Slot Allocation Status Host Kernel/Hypervisor Reducing Monitoring Overhead Nested Page Table Page List - Do NOT monitor some number of hot pages that could be accessed soon … PTE of swapped-out Hot List Warm List page is invalidated. Cold List  Dynamically adjusting the number of hot pages … considering tradeoff between overhead and accuracy - Use extended red-black tree to calculate LRU stack distance in logarithmic time Rebalancing Memory Allocation nested page fault New Memory Allocation Size - A working set size is estimated from its LRU histogram. - Allocation size is proportionally determined over total estimated working set size for all guests. Reclaiming Memory from Guests - Send ballooning request for a guest to give free memory back Hot List Warm List Cold List For Further Information (not monitored) (monitored) (monitored, swapped-out) Please, contact Changwoo Min (multics69@ece.skku.ac.kr)