• No results found

Energy-aware Memory Management through Database Buffer Control

N/A
N/A
Protected

Academic year: 2021

Share "Energy-aware Memory Management through Database Buffer Control"

Copied!
34
0
0

Loading.... (view fulltext now)

Full text

(1)

Energy-aware Memory Management

through Database Buffer Control

Chang S. Bae

,

Tayeb Jamel

Northwestern Univ. Intel Corporation

(2)

Goal and motivation

Energy-aware memory management in software

 In idle time, unload memory to save energy

 In peak time, load memory to get performance

Better performance

More energy consumption

More memory

(3)

Contributions of this work

Energy-aware memory management in software

 In idle time, unload memory to save energy

 In peak time, load memory to get performance

Application-level approach

 Dynamically adaptive buffer management

in data base engine

Real measurements

(4)

Outline

Introduction

Background and metrics

 Application driven approach

 Memory usage in database engine  Metrics

Database buffer pool control

Evaluation

(5)

Application driven energy savings

Software over hardware

 Hardware approach takes more delay to do

measurement and inference

Application-level over OS-level

 Application itself directly and best knows its behavior

(6)

Disk blocks Disk blocks Memory access Disk access If shared buffer misses Application layer OS layer DB manager backend DB manager backend

Database manager uses memory

as buffer pool

Shared buffer Shared buffer

Page (Disk) cache Page (Disk) cache

(7)

Disk blocks Disk blocks Memory access Disk access If OS disk buffer cache misses Application layer OS layer DB manager backend DB manager backend

Database manager uses memory

as buffer pool

Shared buffer Shared buffer

Page (Disk) cache Page (Disk) cache

(8)

Database manager uses memory

as buffer pool

DB manager backend DB manager backend Shared buffer Shared buffer Disk blocks Disk blocks Page (Disk) cache Page (Disk) cache

Memory access

Disk access

Application layer OS layer

(9)

Page (Disk) cache Page (Disk) cache

Managing Buffer pool

with page caching disabled

Memory access Disk access Application layer OS layer

In memory

Disk blocks Disk blocks DB manager backend DB manager backend Shared buffer Shared buffer

(10)

Monitoring buffer pool stats

Buffer hit rate (Bhit)

When to expand buffer pool

Buffer utilization (Butil)

Recently used buffer size

(11)

Scenario for workloads

Online transactional processing (OLTP)

Amount of loaded database varies

 Different number of warehouse in 3-phases  Preserve TPC-C compliancy

Amount of loaded data

Time

(12)

Buffer pool setup for database load

>

Buffer Buffer Buffer Buffer

>

>

Lightweight Buffer Buffer Limited buffer pool (powerdown) Sufficient buffer pool (default) Heavyweight

(13)

Bhit: possible to infer

when to expand buffer pool

85 90 95 100 1 6 11 16 21 26 31 36 41 46 51 56 Bh it(% ) Minutes

Limited buffer pool (powerdown) Amount of

loaded data

Buffer pool size of powerdown

(14)

Bhit: hard to infer

when to shrink buffer pool

85 90 95 100 Bh it(% )

Sufficient buffer pool (default) Buffer pool size

of default

Time Amount of

(15)

0 2500 5000 7500 10000 1 6 11 16 21 26 31 36 41 46 51 56 Butil Sufficient buffer pool (default)

Limited buffer pool (powerdown)

Butil: possible to infer

when to shrink buffer pool

Time Buffer pool size

of default Buffer pool size of powerdown

Amount of loaded data

(16)

Outline

Introduction

Background and metrics

Database buffer pool control

 Threshold-based heuristics  State transitions

Evaluation

Conclusion

(17)

Threshold-based heuristics

High-level states

Expansion: increased buffer pool size Shrink: reduced buffer pool size

 Assuming two distinct domains

Threshold value triggers state transition

Threshold for Bhit triggers expansion Threshold for Butil triggers shrink

(18)

Shrink: waiting for stabilized

Transit to Stable, if warmed up against cold misses

Stable

∆Bhit < 0.1%

(19)

Shrink: check if expansion needed

Monitor Bhit and compare Threshold

Bhit

Monitor Butil to keep maximum as Threshold

Butil

Unstable Stable

ThresholdButil = max(Butil)

(20)

Expanding buffer pool if compromised performance

Fixed ThresholdBhit to 99% for the best performance

Unstable

Stable Expand Expand Unstable

Bhit < 99%

(21)

Expansion: waiting for being

stabilized

Transit to Stable if warmed up against cold misses

Unstable

Stable Expand Expand Unstable

Stable

∆Bhit < 0.1%

(22)

Move to Pre-Shrink when buffer pool looks sufficient

Pre-Shrink: monitor Butil and compare Threshold

Butil

Unstable

Stable Expand Expand Unstable

Stable

Expansion: check if shrink needed

Pre-Shrink

(23)

Shrink buffer pool if Butil is below Threshold

Butil

Unstable

Stable Expand Expand Unstable

Bhit < 99%

Stable

ThresholdButil = max(Butil)

Buffer pool shrink

Pre-Shrink

Shrink Shrink

(24)

Outline

Introduction

Background and metrics

Database buffer pool control

Evaluation

 Software and hardware setup  Experimental results

(25)

Software setup

OLTP – TPCC UVa

v.1.2.3

 Modified to load different size of data in 3-phases

DB manager – PostgreSQL

v.8.4.6

 Resize buffer pool during a runtime

OS – RedHat Enterprise Linux

v.5.5

 Modified Kernel v.2.6.28.8

 Consecutive virtual address linear to physical address in

each socket

(26)

Hardware setup

CPU – Intel Xeon

x7560 2.26GHz  64 cores (16 cores x 4 sockets)

DRAM –DDR3

1066MHz  128 GB (16GB x 2 memory- boards x 4 sockets) A Socket Nehalem EX Platform

(27)

default configuration

No memory power control

One memory board

Socket 0 1 2 3

(28)

default configuration

No memory power control

taken by DB manager

taken by other processes free Expanded buffer pool Dummy OS OLTP workload Active

(29)

powerdown

configuration

Power-down secondary memory boards

Power-down (or Inactive) Active Shrunken buffer pool Socket 0 1 2 3 taken by DB manager

taken by other processes free

(30)

adaptive

configuration

Socket 3 Expand Expand Shrink Shrink Socket 0 1 2 3 Socket 0 1 2 3

(31)

Opportunity of energy savings

3.7E+05 4.0E+05 4.3E+05 4.6E+05 Joul e Energy consumption Default Powerdown Adaptive -4% over Default -8% over Default

(32)

Adaptively retained performance

0 20 40 60 mill ise cond s

Average response time

Default

Powerdown Adaptive

(33)

Conclusion

Opportunity to save energy in DRAM

 Increasing energy consumption in memory resource  Unused memory in idle time

Energy-aware database buffer pool management

 Application driven approach  Threshold based heuristics

 Energy saving without degraded performance  Extensible for wide applicability

(34)

Questions?

Questions and Answers

Author contact information

[email protected], http://www.changbae.org [email protected]

Project website

Intel Energy Checker SDK

http://software.intel.com/en-us/whatif

References

Related documents

For compound Poisson driven Ornstein–Uhlenbeck processes with nonnegative step size Fort and Roberts [17, Lemma 18] proved polynomial rate of convergence, while in the same setup

In this paper we proposed a mobility-based clus- tering approach that can be applied in wireless mobile ad-hoc networks in order to facilitate the implementation of efficient

Request page number pageno from the buffer manager, load it into memory if necessary. Returns a reference to the frame

For each dose at each stage, the data was simulated from a normal distribution with mean equal to that observed in the INHANCE study, and a standard deviation of 0.3L (as given in

Under the new strategy, only a few ants can deposit pheromone, whose solution is: 1) the best solution in an iteration; 2) better than the average value of fitness since the

When a page is read or written on disk and is admitted to the SSD bufferpool, it is placed into this memory buffer first, thereby adding only a small overhead.. Background

 Transfer time: time required to transfer a block of data to the disk controller buffer.. Disk

Section 3 discusses some more general considerations that must be addressed in design, construction and modification Aboriginal housing, including the appropriateness of the