memory resource management in vmware esx server

16
MEMORY RESOURCE MANAGEMENT IN VMWARE ESX SERVER 72130307 김김김 [email protected]

Upload: royal

Post on 22-Feb-2016

112 views

Category:

Documents


0 download

DESCRIPTION

Memory Resource Management in VMware ESX Server. 72130307 김정수 [email protected]. Contents 1. What is ESX Server? 2. Memory Virtualization 3. Reclamation Mechanisms 4. Sharing Memory 5. Shares vs. Working Sets 6. References. 2. 5. 1. 3. 4. 6. 1. What is the ESX Server?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Memory  Resource Management  in VMware ESX Server

MEMORY RESOURCE MANAGEMENT IN VMWARE ESX SERVER

72130307김정수[email protected]

Page 2: Memory  Resource Management  in VMware ESX Server

Contents

1. What is ESX Server?

2. Memory Virtualization

3. Reclamation Mechanisms

4. Sharing Memory

5. Shares vs. Working Sets

6. References

Page 3: Memory  Resource Management  in VMware ESX Server

Operating System

1. What is the ESX Server?

VMVM

VM

Hardware resources

Virtual Machine Monitor

VM

Previously Virtual Machine System (VM/370, Disco etc.)

1 2 3 4 5 6

Page 4: Memory  Resource Management  in VMware ESX Server

1. What is the ESX Server?

VMVM

VM

Hardware resources

ESX Server

VM

- Benefits1) Higher I/O Performance2) Complete control over resource management

Direct Access

1 2 3 4 5 6

Page 5: Memory  Resource Management  in VMware ESX Server

2. Memory Virtualization

Virtual Machine

Kernel code & data..

stack

code

data

Virtual Physical Memory

PFN

PFN

Virtual Machine Monitor

MMU

Physical Memory

Shadow PageTable (RDONLY)

Real Page Table

Trap VMM

1 2 3 4 5 6

Page 6: Memory  Resource Management  in VMware ESX Server

2. Memory Virtualization

ESX Server

- Server can monitor or interpose on guest memory accesses.- This can refer to memory without additional overhead.

1 2 3 4 5 6

Page 7: Memory  Resource Management  in VMware ESX Server

3. Reclamation Mechanisms

- Overcommitment : The total size configured for all running virtual machines exceeds the total amount of actual machine memory.

- Page Replacement : 1) It is just for moving some VM “physical” pages to a swap area on disk.2) The virtual machine system must choose not only the VM from which to revoke memory, but also which of its particular pages to reclaim.3) It causes a double paging problem.4) When the meta-level policy is able to select the same page that the native guest OS policy would choose.

1 2 3 4 5 6

Page 8: Memory  Resource Management  in VMware ESX Server

3. Reclamation Mechanisms

- Ballooning

1) Server can reclaim memory on guest OS whenever server wants.2) There is no interface within the guest and use a private channel for its communication.3) It supports almost operating systems with ballooning driver. (Linux, FressBSD, Windows)

1 2 3 4 5 6

Page 9: Memory  Resource Management  in VMware ESX Server

It may be uninstalled, disabled explicitly, unavailable while a guest OS is booting,or temporarily unable to reclaim memory quickly enough to satisfy current system demands. And reasonable balloon sizes may be imposed by variousguest OS limitations.

3. Reclamation Mechanisms 1 2 3 4 5 6

Is the ballooning perfect solution?

Page 10: Memory  Resource Management  in VMware ESX Server

4. Sharing Memory

- Transparent Page Sharing : Disco introduced for eliminating redundant copies of pages.

1 2 3 4 5 6

Page 11: Memory  Resource Management  in VMware ESX Server

4. Sharing Memory

- Content-Based Page Sharing 1) It eliminates the need to modify, hook, or even understand guest OS code.2) It can identify more opportunities for sharing; by definition, all potentially shareable pages can be identified by their contents.

1 2 3 4 5 6

Page 12: Memory  Resource Management  in VMware ESX Server

4. Sharing Memory

- Implementations

(b) Real-World Page Sharing

(a) Page-Sharing Performance

- By page sharing, ESX Server only uses about 67% of memory with 10 VMs.

1 2 3 4 5 6

Page 13: Memory  Resource Management  in VMware ESX Server

5. Shares vs. Working Sets

- Shared-based Allocation1) For proportional-share allocation of space-shared resources2) Shares-per-page = price3) Revocation reallocates memory away from clients paying a lower price to those willing to pay a higher price.

- Reclaiming idle memory1) Previous attempts to cross-apply techniques from proportional-share CPU resource man-agement to compensate for idleness have not been successful.2) Idle memory tax : To charge a client more for an idle page than for on it is actively using.

3) The ESX Server idle memory tax rate is a configurable parameter that defaults to 75%.

1 2 3 4 5 6

Page 14: Memory  Resource Management  in VMware ESX Server

5. Shares vs. Working Sets

- Experimental Results

- The statistical estimate of active memory usage responds quickly as more memory is touched, tracking the fast moving average, and more slowly as less memory is touched, tracking the slow moving average.

- “zero page thread” that runs only when no other threads are runnable.

- Results that demonstrate the effectiveness of imposing a tax on idle memory.

1 2 3 4 5 6

Page 15: Memory  Resource Management  in VMware ESX Server

6. References

[1] Edouard Bugnion, Scott Devine, Kinshuk Govil, and Mendel Rosenblum. “Disco: Running Commodity Operating Systems on Scalable Multiprocessors,” ACMTransactions on Computer Systems, 15(4), November 1997.

1 2 3 4 5 6

Page 16: Memory  Resource Management  in VMware ESX Server

Thank you