vCache: Architectural Support for Transparent and Isolated Virtual - - PowerPoint PPT Presentation

vcache architectural support for transparent and isolated
SMART_READER_LITE
LIVE PREVIEW

vCache: Architectural Support for Transparent and Isolated Virtual - - PowerPoint PPT Presentation

vCache: Architectural Support for Transparent and Isolated Virtual LLCs in Virtualized Environments Daehoon Kim * , Hwanju Kim , Nam Sung Kim * , and Jaehyuk Huh * University of Illinois at Urbana-Champaign, University of Cambridge,


slide-1
SLIDE 1

Daehoon Kim* , Hwanju Kim†, Nam Sung Kim *, and Jaehyuk Huh‡

*University of Illinois at Urbana-Champaign, † University of Cambridge,‡ KAIST

vCache: Architectural Support for Transparent and Isolated Virtual LLCs in Virtualized Environments

slide-2
SLIDE 2

2

Virtualized Environments

 Resource virtualization for VM consolidation

 Providing an illusion of having dedicated physical resources to a VM  e.g., CPU, memory, I/O devices  LLC (Last-level Cache) is not virtualized

 LLC virtualization

 Transparency: controllable by guest OS

  • e.g., page coloring

 Isolation: isolated capacity V M LLC V M V M VM VM VM VM vLLC vLLC vLLC vLLC

Providing transparent and isolated virtual LLCs to VMs

slide-3
SLIDE 3

3

Background: Page Coloring

 Page coloring: a software-based LLC placement technique

 OS controls placement of a page in LLC by manipulating a physical address  Balancing cache accesses by spreading data across the entire LLC  Partitioning LLC to avoid cache contention

 Page coloring techniques

 [MICRO 08’][HPCA 09’][EUROSYS 09’]…  Mainstream OS

  • e.g. Solaris, FreeBSD, WindowNT

physical address page color page offset cache block

  • ffset

cache index page color

slide-4
SLIDE 4

4

Background: Memory Virtualization

 An additional address translation for consolidation

 Guest-Virtual Address (GVA) to Guest-Physical Address (GPA) by guest OS  GPA to Host-Physical Address(HPA) by hypervisor

 Page coloring of a guest OS becomes ineffective with HPA- indexed LLC

memory virtualization memory

page allocation

VM 1 VM 2

page allocation

memory memory

slide-5
SLIDE 5

5

 Example: pollute buffer mechanism [MICRO 08’]

 Classify cache unfriendly pages as pollute pages  Map pollute pages to an isolated LLC region (pollute buffer)  Avoid LLC contentions by pollute pages

Page Coloring in Virtualized Systems

PA LLC pollute pages pollute buffer Page coloring (pollute buffer)

OS

VA

slide-6
SLIDE 6

6

 Example: pollute buffer mechanism [MICRO 08’]

 Classify cache unfriendly pages as pollute pages  Map pollute pages to an isolated LLC region (pollute buffer)  Avoid LLC contentions by pollute pages

Hypervisor

Page Coloring in Virtualized Systems

GPA GVA HPA

Guest OS

LLC pollute pages pollute buffer Page coloring (pollute buffer) Memory virtualization

slide-7
SLIDE 7

7

 Example: pollute buffer mechanism [MICRO 08’]

 Classify cache unfriendly pages as pollute pages  Map pollute pages to an isolated LLC region (pollute buffer)  Avoid LLC contentions by pollute pages

Page Coloring in Virtualized Systems

# of occurrences of memory ballooning

slide-8
SLIDE 8

8

Interference by VM Consolidation

 Unexpected interference by co-running VMs

 Page color preservation alone cannot provide benefits of page coloring in consolidated environments

OS Non-virtualized System Virtualized System LLC Page Coloring A VM Page Coloring A VM Page Coloring B LLC Assume that page colors are preserved

slide-9
SLIDE 9

9

vCache: Transparency

 GPA-indexed HPA-tagged virtual LLC  Use GPA for indexing LLC

 GVA-to-GPA is managed by guest OS  Allow VMs to control LLC placement  GPA can be obtained when translating address w/o additional steps

 Maintain Full HPA for tag matching

 Extend each tag to store HPA color (e.g., 7 bits for 128 colors)

LLC GPA HPA GVA By guest OS By hypervisor

HPA-indexed LLC Tag Index Block Offset GPA-indexed LLC Tag Block Offset Tag with HPA Index

slide-10
SLIDE 10

10

vCache: Transparency

 Use HPA for indexing pages that cannot use GPA as LLC index

 i.e., hypervisor pages and shared pages

 Extend TLB entry

 GPA color (e.g., 7 bits for 128 colors)  Page status (1 bit)

 Cache coherence support

 Coherence requests maintain GPA color bits  Extend L1/L2 cache tags to store GPA color for write-back to LLC

0x001 0x05 0x010 0x003 0x06 0x020 P S

LLC

tag color data

P/S

GVA GPA HPA

Index with GPA Index with HPA

P: normal S: hypervisor or shared TLB

slide-11
SLIDE 11

11

vCache: Isolation

 Isolated capacity: VM-based LLC partitioning in way granularity

 vLLC partition table

  • Maintain vLLC capacity mandated by the contract with its user
  • Set by hypervisor

 Work-conserving policy: Unreserved/unused capacity is shared  Modified LRU: Choose a cache line belongs to VMs with more cache lines than allocated capacity as a victim

MRU

VMID Capacity VM-1 2 way(s) VM-2 4 way(s) VM-3 3 way(s) VM-4 3 way(s)

vLLC partition table LRU

Counter 3 3 4 2

vCache chooses a cache line closer to global LRU position

VM-1 and VM-3 have more cache lines than allocated capacity

slide-12
SLIDE 12

12

Experimental Methodology

 Running Xen hypervisor on SIMICS

 Pollute buffer mechanism [MICRO 08’] and ULCC [PPoPP 11’]

  • ULCC: User-level page coloring interface

 1 way = 1 MB: 4MB, 8MB, and 12MB LLC  Workloads

  • Mixes of SPECCPU benchmarks for pollute buffer
  • Pluto benchmarks for ULCC

 Change GPA-to-HPA mappings with memory ballooning Xen hypervisor full-system simulator pollute buffer

VM

ULCC

VM

slide-13
SLIDE 13

13

 IPC improvement – after initial booting

Results with Single VM

HPA-indexed LLC shows almost same results with vCache after initial booting

slide-14
SLIDE 14

14

Results with Single VM

 IPC improvement – after ballooning

For hmmer, vCache shows 17% IPC improvement while HPA-indexed LLC shows less than 1% improvement after memory ballooning

slide-15
SLIDE 15

15

Results with Multiple VMs

 IPC improvement: two VMs (VM1: 4MB, VM2: 8MB)

 Each of which runs with pollute buffer and ULCC with GPA- based indexing

GPA-based indexing alone cannot preserve effectiveness

  • f page coloring in consolidated environment
slide-16
SLIDE 16

16

Results with Multiple VMs

 IPC improvement: two VMs (VM1: 4MB, VM2: 8MB)

 Each of which runs with pollute buffer and ULCC with GPA- based indexing

For soplex, sLLC further improves performance by 37% points while it degrades performance of co- running VM by 23% points

slide-17
SLIDE 17

17

Results with Multiple VMs

 IPC improvement: two VMs (VM1: 4MB, VM2: 8MB)

 Each of which runs with pollute buffer and ULCC with GPA- based indexing

vCache preserves the effectiveness of page coloring by guest OS with isolated capacity

slide-18
SLIDE 18

18

 vCache provides a transparent and isolated virtual LLC to a VM

 Transparency: GPA-indexed HPA-tagged  Isolation: VM-based LLC partitioning in way granularity  vCache preserves the page coloring policy deployed by each VM as non-virtualized systems

Conclusion

Page coloring A

VM LLC vLLC vLLC vLLC vLLC

Page coloring B

VM

Page coloring C

VM

Page coloring D

VM