Performance directed energy management using BOS technique

Slides:



Advertisements
Similar presentations
Conserving Disk Energy in Network Servers ACM 17th annual international conference on Supercomputing Presented by Hsu Hao Chen.
Advertisements

4.4 Page replacement algorithms
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Virtual Memory: Page Replacement
Paging: Design Issues. Readings r Silbershatz et al: ,
Jaewoong Sim Alaa R. Alameldeen Zeshan Chishti Chris Wilkerson Hyesoon Kim MICRO-47 | December 2014.
Energy Efficiency through Burstiness Athanasios E. Papathanasiou and Michael L. Scott University of Rochester, Computer Science Department Rochester, NY.
Virtual Memory Operating System Concepts chapter 9 CS 355
Chapter 101 Cleaning Policy When should a modified page be written out to disk?  Demand cleaning write page out only when its frame has been selected.
Segmentation and Paging Considerations
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
Virtual Memory Chapter 8.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Computer Organization and Architecture
1 Lecture 14: Virtual Memory Today: DRAM and Virtual memory basics (Sections )
1 Virtual Memory Management B.Ramamurthy Chapter 10.
OS Spring’04 Virtual Memory: Page Replacement Operating Systems Spring 2004.
Maninder Kaur VIRTUAL MEMORY 24-Nov
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Virtual Memory.
Memory Management in Windows and Linux &. Windows Memory Management Virtual memory manager (VMM) –Executive component responsible for managing memory.
By Matthew Smith, John Allred, Chris Fulton. Requirements Relocation Protection Sharing Logical Organization Physical Organization.
1 Design and Performance of a Web Server Accelerator Eric Levy-Abegnoli, Arun Iyengar, Junehwa Song, and Daniel Dias INFOCOM ‘99.
Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Seventh Edition William Stallings.
Free Space Management.
1 Virtual Machine Memory Access Tracing With Hypervisor Exclusive Cache USENIX ‘07 Pin Lu & Kai Shen Department of Computer Science University of Rochester.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 10: Virtual Memory Background Demand Paging Page Replacement Allocation of.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Review °Apply Principle of Locality Recursively °Manage memory to disk? Treat as cache Included protection as bonus, now critical Use Page Table of mappings.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
1 Virtual Memory. Cache memory: provides illusion of very high speed Virtual memory: provides illusion of very large size Main memory: reasonable cost,
Energy Efficient Prefetching and Caching Athanasios E. Papathanasiou and Michael L. Scott. University of Rochester Proceedings of 2004 USENIX Annual Technical.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 7 – Buffer Management.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Memory Virtualization In Xen
Virtual Memory.
Virtual Memory Chapter 8.
Chapter 2: The Linux System Part 4
OPERATING SYSTEM CONCEPTS AND PRACTISE
ECE232: Hardware Organization and Design
Memory COMPUTER ARCHITECTURE
CS703 - Advanced Operating Systems
Chapter 9: Virtual Memory
Lecture: Large Caches, Virtual Memory
Lecture 45 Syed Mansoor Sarwar
Chapter 9: Virtual Memory
EECE.4810/EECE.5730 Operating Systems
Chapter 9: Virtual-Memory Management
Lecture 23: Cache, Memory, Virtual Memory
Page Replacement.
Overview Continuation from Monday (File system implementation)
Demand Paged Virtual Memory
Operating Systems.
Qingbo Zhu, Asim Shankar and Yuanyuan Zhou
Overview: File system implementation (cont)
Chapter 4: Memory Management
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Contents Memory types & memory hierarchy Virtual memory (VM)
CSE 451 Autumn 2003 November 13 Section.
Virtual Memory: Working Sets
CSE 542: Operating Systems
Operating Systems Concepts
COMP755 Advanced Operating Systems
Virtual Memory.
Efficient Migration of Large-memory VMs Using Private Virtual Memory
Presentation transcript:

Performance directed energy management using BOS technique Pratap Ramamurthy Ramanathan Palaniappan University of Wisconsin-Madison

Outline Introduction BOS Mechanisms Policies Results Conclusion

Introduction

Introduction Energy consumption in mobile devices and laptops Memory could consume 50% more power than processors Is there hardware support ? RAMBUS devices provide capability

Problem Statement How to save power in memory without hurting performance ? Solution: BOS Estimating the optimal amount of memory based on paging activity. Dynamic resizing of memory !

What is BOS ? BOS – Ballooning in-OS technique Tracks current memory requirements Tracks chip access pattern Powers down memory chips Minimizes power consumption

BOS Mechanisms Ballooning in-OS technique Chip selection Power Down Page Migration Page Reservation Invisible Buddy Chip recovery (Power up) Chip selection Intercept memory accesses

BOS policies Power decision Epoch Chip selection Disk activity, # chips powered on Epoch Time interval between two decisions Chip selection Access pattern

Inferences Operating point balances disk accesses and memory power consumption Cost of thrashing offsets the power saved from a single chip Most media applications do not need the entire RAM Least allocated chips are not the least accessed ones

BOS Architecture Migrate Chip Power Table (CPT) Pin the page Wake up Kpower_d Wait an Epoch Get system parameters Decide to Power off/on Do Nothing ON Recover PowerPages Clear flags & unPin OFF Select Chip Loop all pages in chip Update Chip Power Table (CPT) If occupied Migrate If page is free Pin the page If Locked or reserved Wait & Pounce

BOS Mechanisms

Mechanisms In-OS Ballooning Techniques Chip Selection Page Migration Page Reservation Invisible Buddy Chip Recovery Chip Selection Intercept Memory Accesses No Actual Power Down

So replace page using LRU… Power down Selected Chip 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 Under Memory pressure ??? DISK So replace page using LRU… And Migrate!

Page Migration When to migrate ? Kinds of pages File pages Anonymous pages Swap cache pages Free Pages

Page Migration Mechanism Data Transfer Reverse map (thanks to Linux Kernel 2.6) Remap Dependant data structures Page Table Active LRU and Inactive LRU Page cache Swap cache Buffers Flags

Page Migration Major Data Structures Updated while Migrating Processes 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 Buffers LRU lists 1010101010 1010100010 1010001010 1010101010 1010100010 1010001010 1. Memcopy 2. Remapping using rmap 3. Update buffers 4. Remove from LRU lists

Page Reservation Ways to Pin pages Remove from LRU Lists Reserve Page Lock Page Page count

Free Pages Buddy allocator List of free pages Buddy Order (0-11) Locality How to deal with already free pages?

Invisibility in Action (Buddy allocator) 2 1 Make the ‘power’ pages invisible Request for a free page of order 0 Request for a page of order 1 (Invisibility in action)

Invisible Buddy Power Bit Invisibility – divert page allocation Other methods? Why not always remove the page completely from the buddy allocator? Because the free pages are not necessarily in the buddy

Recovery Page in the buddy Pages that were migrated Reverse Recovery Clear power bit That’s it ! Pages that were migrated Clear Power bit Add to the buddy Reverse Recovery Recover the last pinned page and move backwards

Partial Recovery Why would you abort a chip? Easy solution Locked pages Reserved pages IO activity Easy solution Abort chip Better solution Wait and Pounce

Policies

Policy Epoch Power decision Chip select Time interval between two decisions Power decision Disk activity, # chips powered on Chip select Access pattern

Chip Selection Mechanism Chip pattern table Access history over 32 epochs Form a number with the bits and Select the minimum ! How to monitor chip access ? Referenced bit in h/w Clear bits Examine every epoch 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 The least accessed chip is # 6 The least accessed chip is # 7

Results

Results

Chip access pattern

Results # Off Available Memory (MB) 512 10 352 15 272 20 192

Results

BOS architecture Migrate Chip Power Table (CPT) Pin the page Wake up Kpower_d Wait an Epoch Get system parameters Decide to Power off/on Do Nothing ON Recover PowerPages Clear PowerBit & unPin OFF Select Chip Loop all pages in chip Update Chip Power Table (CPT) If occupied Migrate If page is free Pin the page If Locked or reserved Wait & Pounce

Power down/up decision If ( # disk_access < α ) power_down() elseif ( # disk_access > β ) power_up() elseif (α < # disk_access < β ) take_no_action() α, β – thresholds, α < β

Results

Results Other workloads Application # chips ON Memory used Xmms Mp3 player 7 112 MB Totem media player (X-server) 25 400 MB Mozilla,X-server, Open-office (together) 12 192 MB

Conclusion

Conclusion BOS technique is feasible BOS helps us to vigorously control memory size Chip allocation and access pattern have no correlation Several applications do not require the full memory Threshold based policy gives reasonable performance An incorrect chip select could increase migration overhead

Summary BOS philosophy Implementation of BOS Mechanism Policy Page migration Invisible buddy Chip recovery Chip access pattern Policy Study of sample workloads Threshold based policy

Acknowledgements lxr.linux.no We would like to thank the following people for their valuable time and for the immensely helpful discussions in the course of this project Remzi H. Arpaci-Dusseau Muthian Sivathanu Vijayan Prabhakaran Lakshmi Bairavasundaram Amit Jhawar for resources

?

References Huang et.al. “Design and Implementation of Power-Aware Virtual Memory”, USENIX 2003. Lebeck et.al. “ Power Aware Page Allocation”, ASPLOS 2000. Li et.al. “Performance directed energy management for main memory and disks”, ASPLOS 2004. Delaluz et.al. “Scheduler-Based DRAM Energy Management”, DAC 2002.

Related Work Power Aware Virtual Memory [1] Per process chip select Localized per process page allocation Performance not considered Execution Time based energy management [ref] Hardware support for energy management Various power modes in RAMBUS Various power modes in disks

Tough nuts to crack Absolutely no Documentation for Linux 2.6 memcpy() Alternate recovery mechanism Multiple chip select policy Alternate Allocator mechanism Removing from LRU