23
Software-Controlled Transparent Software-Controlled Transparent Management of Heterogeneous Memory Management of Heterogeneous Memory Resources in Virtualized Systems Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing Georgia Tech, Atlanta

Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Embed Size (px)

Citation preview

Page 1: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Software-Controlled Transparent Software-Controlled Transparent Management of Heterogeneous Memory Management of Heterogeneous Memory

Resources in Virtualized SystemsResources in Virtualized Systems

Min Lee, Vishal Gupta, Karsten Schwan

College of ComputingGeorgia Tech, Atlanta

Page 2: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

3D Stacked Memory3D Stacked Memory

3D-Stacked Memory Architectures for Multi-core Processors [ISCA’08]

Page 3: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Heterogeneous Heterogeneous MemoryMemory

Capacity constraint on die-stacked memory Heterogeneous memory organization consisting of

on-chip and off-chip memory

Cores

Stacked On-chip Memory

Off-chip Memory (DDR)

Page 4: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Usage ModelsUsage Models

• Large Cache: hardware managed large last-level-cache (L4)

• Heterogeneous Memory: system-visible heterogeneous memory (our focus)

Page 5: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Why not H/W cache?Why not H/W cache?Advantages:Quickly react to changing access patternsSupports legacy software

Challenges:• Overhead of tags, requiring significant on-chip resources• Extending coherency protocols (design challenges and latency

penalty)• Diminishing returns• No higher-level information

Page 6: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Challenges in Virtualized Challenges in Virtualized SystemsSystems

• Managing Heterogeneity: How to handle memory allocation?

• Access tracking: How to track VM memory activity in the hypervisor?

• Transparent Page migration: How to implement page migrations without guest VM involvement?

Page 7: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

OutlineOutline

• Motivation• Memory management mechanisms• Experimental Evaluation• Conclusions & Future Work

Page 8: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Basic ideaBasic idea• Detect Hot pages and put them in the stacked memory

• Implemented in Xen hypervisor, a popular open-source hypervisor

• Heterogeneity management is transparent

Page 9: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Memory Access Memory Access TrackingTracking

• Use page-table access-bits to build access-bit history• Scan page tables every 100 ms and maintain 32-bit access-bit

history

Page 10: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Hot Page ManagementHot Page Management

Page 11: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Handling Shared Handling Shared PagesPages

Reverse-maps for remapping shared pages

Page 12: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Transparent Page Transparent Page MigrationMigration

Mirror page tables for transparent page-remapping

Page 13: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Virtual Time TrackingVirtual Time TrackingAccounting in virtual-time instead of real-time for higher accuracy

3 events:•VM switch•Process switch•Timer tick

Page 14: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Memory Allocation Memory Allocation PoliciesPolicies

• Share-based allocation: allocation stacked memory using administrator-defined weights

• WSS-based allocation: use dynamically determined working-set sizes as the weights for allocation

Page 15: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Experimental Experimental EvaluationEvaluation

Page 16: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Emulation PlatformEmulation PlatformA dual-socket Westmere platform, with memory throttling to

emulate heterogeneous memory

Socket 0(8 –

cores)

Socket 0(8 –

cores)

Socket 1(8 –

cores)

Socket 1(8 –

cores)

DRAMDRAMThrottled

DRAMThrottled

DRAM

Page 17: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Impact of Memory Impact of Memory ThrottlingThrottling

Emulating different memory configurations

Page 18: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Working-set Size Working-set Size TrackingTracking

Diverse WSS across applications with time-changing behavior requiring dynamic management

Page 19: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Memory Access Memory Access PatternsPatterns

Diverse memory access patterns

Page 20: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Impact of Memory Impact of Memory SpeedSpeed

Significant performance impact for several applications

Page 21: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Micro-benchmark Micro-benchmark ResultsResults

Benchmark: Random access to large area of memory (100MB) All memory initially allocated from slow memory Significant decrease in memory access latency with page-

migrations enabled

Page 22: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

ConclusionsConclusions• A case for managing heterogeneous memory

resources in software• Hypervisor-level mechanisms for transparent

memory management

Future Work• Various optimization to reduce page-migration

costs• Implementation of memory allocation policies

Page 23: Software-Controlled Transparent Management of Heterogeneous Memory Resources in Virtualized Systems Min Lee, Vishal Gupta, Karsten Schwan College of Computing

Thank you.Thank you.

Questions or comments?