Energy efficient storage in vm
-
Upload
xen-project -
Category
Technology
-
view
1.537 -
download
0
description
Transcript of Energy efficient storage in vm
Lei Ye, Gen Lu, Sushanth Kumar,
Chris Gniady, John H. Hartman
Department of Computer Science
University of Arizona
Energy-Efficient Storage in
Virtual Machine Environments
1Xen Summit at AMD April 28-29, 2010
Energy is Critical
Energy consideration is critical for system design
Virtualization is becoming common in all platforms
Integration of virtualization and energy management is critical
for overall system efficiency
OS1
App
OSn
App…
VMM
OS1
App
OSn
App…
VMM
OS1
App
OSn
App…
VMM
2Xen Summit at AMD April 28-29, 2010
Current Environment for Energy Management
OS is the central point for energy management
Global views of application execution
OS directly interacts with the hardware
Detailed hardware knowledge allows sophisticated energy
management
Physical
Hardware
Operating
Systems
Applications
3Xen Summit at AMD April 28-29, 2010
Abstraction in Virtual Machines
Where should we manage energy?
OS only sees the virtualized hardware
VMM is unaware of the application execution
Separation of hardware and OS makes energy management a
challenge
Virtual Machine Monitor
4Xen Summit at AMD April 28-29, 2010
Cross-layer Energy Optimization
Goals
Preserve VM abstractions
Adapt current energy optimization
Approach
Shape I/O accesses at VMM
Provide hints from VMM to the VMs
Outcome
Integrate existing disk energy management into VM
5Xen Summit at AMD April 28-29, 2010
Outline
Introduction
Existing Mechanisms
Design
Evaluation
Conclusion
6Xen Summit at AMD April 28-29, 2010
Existing Disk Energy Management
Goal: Maximize length of sleeping periods
Must exceed break-even time
Approach: Shaping write activities
Consequence:
Maximize disk off time
Reduce disk spin-ups
Last I/O New I/O
Timeout
starts
Timeout
expires
sleep
Spin-up
I/O Idle I/O
Spin-down
7Xen Summit at AMD April 28-29, 2010
Buffer Cache
Function
Store data temporarily (default 30 seconds)
Perform data transfer for block device
Advantage
Trade disk accesses for memory accesses
Disadvantage
Loss of buffered data in case of system crash
Linux Kernel
File
System
Buffer
CacheApplications
8Xen Summit at AMD April 28-29, 2010
Buffer Cache Complicates Timeout
Timeout might occur when there are pending writes
Disk spin-up might occur even in absence of application I/O
30 seconds
Timeout
starts
Timeout
expires
sleep
Spin-up
I/O I/O
App I/O
to buffer cache
Buffer cache
flush
Data delivered
to disk
Idle Idle
9Xen Summit at AMD April 28-29, 2010
Early Flush
Do buffer flushes prior to shutdown
No impact on desired I/O reliability
I/O Idle
Idle
OS
I/O
I/O
Idle
Early Flush
Idle Idle
sleep
Physical
Disk state
Buffer Flush
10Xen Summit at AMD April 28-29, 2010
Extended Buffering
Can extend idle time under writes
May impact I/O reliability
Idle Buffer Flush
I/O
30 seconds
Buffer being flushed
sleep sleepsleep
Extended idle time
Idle
Physical
Disk state
OS
IdleBuffer Flush I/OIdle
11Xen Summit at AMD April 28-29, 2010
Buffer Flushes in Virtual Machines
Guest OS is unaware of physical disk state
Buffer flushes from VMs are unsynchronized
I/O Idle I/O
VM1
Buffer Flush
Buffer Flush Idle
VM2
I/O
I/O
Idle I/O Idle
Idle Idle
Idle
Idle Idle
Idle
IdleIdle
Physical
Disk state
I/O
sleep sleep sleep
Virtual Machine Monitor
12Xen Summit at AMD April 28-29, 2010
Early Flush in Virtual Machines
Hints signal disk shutdown and trigger flush
Disk spin-ups avoided and disk idle time maximized
I/O Idle
VM1
Idle
VM2
I/O
I/O
Idle Idle Idle Idle IdleIdle
I/O
Idle
Early Flush Notification
Idle
Idle
Idle
Idle
sleep
Virtual Machine Monitor
Physical
Disk state
Buffer Flush
Buffer Flush
13Xen Summit at AMD April 28-29, 2010
Buffering in Virtual Machine Monitor
Extend disk idle time
Buffer writes from VMs
Only when the disk is sleeping
Only one copy of data
Buffer is flushed when:
VMM buffer timeout (30 seconds)
Read request from a VM
Reads and sync from VMs are processed immediately
Impact I/O reliability
14Xen Summit at AMD April 28-29, 2010
Evaluation Methodology
Trace collection
8 concurrent VMs as remote desktops on Xen
Users interact with VMs remotely via VNC
Rsyslog: timestamps of I/O activity, I/O type, access size,
domain identifier, process identifier, process name, and file
inode
Traces: 12 hours per VM
Common interactive applications
Disk drive:
WD2500JD: High performance drive, 9 s. long spin-up time
15Xen Summit at AMD April 28-29, 2010
Disk I/O Trace Statistics
Configuration
1 VM – 1 user
2 VMs – 2 concurrent users
4 VMs – 4 concurrent users
8 VMs – 8 concurrent users
Number of
VMs
Number of
Reads
Number of
Writes
Number of
Idle Periods
Total Idle
Time [s]
1 62951 1339 255 40071
2 64886 17031 435 37470
4 83050 59407 601 31263
8 160049 103840 566 20450
16Xen Summit at AMD April 28-29, 2010
Distribution of Idle Periods
0
100
200
300
400
500
600
700
2 4 8 16 32 64 128
1 VM 2 VMs 4 VMs 8 VMs
Time [Break-Even Period]
Num
ber
of
Idle
Per
iod
s
17Xen Summit at AMD April 28-29, 2010
Energy Consumption
0
100
200
300
400
500
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Sleep
Power-Cycle
Active
Ener
gy C
onsu
mp
tio
n (
KJo
ule
s)
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
18Xen Summit at AMD April 28-29, 2010
Execution Time
0
2
4
6
8
10
12
14
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Spin-up Idle > BE Active
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
Exec
uti
on T
ime
(Ho
urs
)
19Xen Summit at AMD April 28-29, 2010
Reducing Spin-ups
0
100
200
300
400
500
600
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Buffered Write
Write
Read
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
Num
ber
of
Sp
in-u
ps
20Xen Summit at AMD April 28-29, 2010
Energy Delay Product
0
0.2
0.4
0.6
0.8
1
1.2
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
No
rmal
ized
Ener
gy D
elay
Pro
duct
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
21Xen Summit at AMD April 28-29, 2010
Buffering in VMM with Immediate Sleep
The disk is put to sleep immediately after a buffer flush
VMM buffer flush independent from VM I/Os
Physical
Disk state
VM1
VM2
Idle Buffer Flush
VMM
Delayed Writes
I/O
Writes being buffered
30 seconds Buffer being flushed
Idle
Idle
sleep sleepsleep
Extended idle time
Idle Buffer Flush
Writes being buffered
22Xen Summit at AMD April 28-29, 2010
Immediate Sleep Optimization
0
100
200
300
400
T I T I T I T I T I T I T I T I
B BF B BF B BF B BF
1 VM 2 VMs 4 VMs 8 VMs
Sleep
Power-Cycle
Active
Ener
gy C
onsu
mp
tion (
KJo
ule
s)
B-Buffering, BF-Buffering&Early Flush, T-Timeout, I-Immediate
23Xen Summit at AMD April 28-29, 2010
Writes in Buffering and Early Flush
Buffering in the VMM can result in additional delays
The longer the write resides the buffer, the higher the impact
on reliability
VMs Mechanisms Write Delay Delayed Writes Early Flush
Participants
1 Buffering
Early Flush
Buffering & Early Flush
14.5s
N/A
10.6s
3.5
N/A
1.9
N/A
1.0
1.0
2 Buffering
Early Flush
Buffering & Early Flush
13.8s
N/A
14.0s
8.3
N/A
9.2
N/A
1.1
1.0
4 Buffering
Early Flush
Buffering & Early Flush
13.8s
N/A
15.5s
11.3
N/A
9.8
N/A
1.2
1.2
8 Buffering
Early Flush
Buffering & Early Flush
13.9s
N/A
13.2s
14.1
N/A
16.1
N/A
1.4
1.5
24Xen Summit at AMD April 28-29, 2010
Conclusion
Existing energy optimizations require modification to be
effective in a VM environment
OS only sees the virtualized hardware
VMM is unaware of the application execution
Early Flush reduces spin-ups due to buffer flushes
Reduce energy by 10.5% compared with standard case in 8 VMs
VMM buffering extends disk idle time by delaying VM writes
Reduce energy by 7.7% compared with standard case in 8 VMs
Combination reduces energy consumption by 14.8% in 8 VMs
25Xen Summit at AMD April 28-29, 2010
Q & A
Thank You