Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Energy efficient storage in vm
1. Energy-Efficient Storage in
Virtual Machine Environments
Lei Ye, Gen Lu, Sushanth Kumar,
Chris Gniady, John H. Hartman
Department of Computer Science
University of Arizona
2. Energy is Critical
App App App App App App
… … …
OS1 OSn OS1 OSn OS1 OSn
VMM VMM VMM
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
Xen Summit at AMD April 28-29, 2010 1
3. Current Environment for Energy Management
Applications
Operating
Systems
Physical
Hardware
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
Xen Summit at AMD April 28-29, 2010 2
4. Abstraction in Virtual Machines
Virtual Machine Monitor
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
Xen Summit at AMD April 28-29, 2010 3
5. 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
Xen Summit at AMD April 28-29, 2010 4
7. Existing Disk Energy Management
Last I/O New I/O
Spin-down
I/O Idle sleep I/O
Spin-up
Timeout Timeout
starts expires
Goal: Maximize length of sleeping periods
Must exceed break-even time
Approach: Shaping write activities
Consequence:
Maximize disk off time
Reduce disk spin-ups
Xen Summit at AMD April 28-29, 2010 6
8. Buffer Cache
File Buffer
Applications
System Cache
Linux Kernel
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
Xen Summit at AMD April 28-29, 2010 7
9. Buffer Cache Complicates Timeout
App I/O Buffer cache Data delivered
to buffer cache flush to disk
30 seconds
I/O Idle Idle sleep I/O
Spin-up
Timeout Timeout
starts expires
Timeout might occur when there are pending writes
Disk spin-up might occur even in absence of application I/O
Xen Summit at AMD April 28-29, 2010 8
10. Early Flush
OS
I/O Idle Buffer Flush
Idle Idle Idle
Early Flush
Physical
Disk state
I/O Idle I/O sleep
Do buffer flushes prior to shutdown
No impact on desired I/O reliability
Xen Summit at AMD April 28-29, 2010 9
11. Extended Buffering
OS
Idle Buffer Flush
Idle Idle
Buffer Flush I/O Idle
30 seconds
Physical Buffer being flushed
Disk state
sleep sleep I/O sleep
Extended idle time
Can extend idle time under writes
May impact I/O reliability
Xen Summit at AMD April 28-29, 2010 10
12. Buffer Flushes in Virtual Machines
VM1
I/O Idle Idle Buffer Flush Idle Idle IdleIdle
VM2
I/O Idle I/O Idle Buffer Flush Idle
Virtual Machine Monitor
Physical
Disk state
I/O Idle I/O Idle I/O Idle
sleep sleep sleep
Guest OS is unaware of physical disk state
Buffer flushes from VMs are unsynchronized
Xen Summit at AMD April 28-29, 2010 11
13. Early Flush in Virtual Machines
VM1
I/O Idle Idle
Buffer Flush Idle Idle Idle Idle
Idle
VM2
I/O Idle Buffer Flush
Idle Idle Idle
Early Flush Notification
Virtual Machine Monitor
Physical
Disk state
I/O Idle I/O sleep
Hints signal disk shutdown and trigger flush
Disk spin-ups avoided and disk idle time maximized
Xen Summit at AMD April 28-29, 2010 12
14. 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
Xen Summit at AMD April 28-29, 2010 13
15. 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
Xen Summit at AMD April 28-29, 2010 14
16. Disk I/O Trace Statistics
Number of Number of Number of Number of Total Idle
VMs Reads Writes Idle Periods Time [s]
1 62951 1339 255 40071
2 64886 17031 435 37470
4 83050 59407 601 31263
8 160049 103840 566 20450
Configuration
1 VM – 1 user
2 VMs – 2 concurrent users
4 VMs – 4 concurrent users
8 VMs – 8 concurrent users
Xen Summit at AMD April 28-29, 2010 15
17. Distribution of Idle Periods
1 VM 2 VMs 4 VMs 8 VMs
700
600
Number of Idle Periods
500
400
300
200
100
0
2 4 8 16 32 64 128
Time [Break-Even Period]
Xen Summit at AMD April 28-29, 2010 16
18. Energy Consumption
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
500
Sleep
Energy Consumption (KJoules)
400 Power-Cycle
Active
300
200
100
0
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Xen Summit at AMD April 28-29, 2010 17
19. Execution Time
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
14
Spin-up Idle > BE Active
12
Execution Time (Hours)
10
8
6
4
2
0
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Xen Summit at AMD April 28-29, 2010 18
20. Reducing Spin-ups
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
600
Buffered Write
500 Write
Number of Spin-ups
400 Read
300
200
100
0
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Xen Summit at AMD April 28-29, 2010 19
21. Energy Delay Product
S-Standard, B-Buffering, F-Early Flush, BF-Buffering&Early Flush
1.2
Normalized Energy Delay Product
1
0.8
0.6
0.4
0.2
0
S B F BF S B F BF S B F BF S B F BF
1 VM 2 VMs 4 VMs 8 VMs
Xen Summit at AMD April 28-29, 2010 20
22. Buffering in VMM with Immediate Sleep
VM1
Idle Buffer Flush Idle
VM2 Writes being buffered
Idle Buffer Flush Idle
VMM Writes being buffered
Delayed Writes
Physical
30 seconds Buffer being flushed
Disk state
sleep sleep I/O sleep
Extended idle time
The disk is put to sleep immediately after a buffer flush
VMM buffer flush independent from VM I/Os
Xen Summit at AMD April 28-29, 2010 21
23. Immediate Sleep Optimization
B-Buffering, BF-Buffering&Early Flush, T-Timeout, I-Immediate
400
Energy Consumption (KJoules)
Sleep
300 Power-Cycle
Active
200
100
0
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
Xen Summit at AMD April 28-29, 2010 22
24. Writes in Buffering and Early Flush
VMs Mechanisms Write Delay Delayed Writes Early Flush
Participants
1 Buffering 14.5s 3.5 N/A
Early Flush N/A N/A 1.0
Buffering & Early Flush 10.6s 1.9 1.0
2 Buffering 13.8s 8.3 N/A
Early Flush N/A N/A 1.1
Buffering & Early Flush 14.0s 9.2 1.0
4 Buffering 13.8s 11.3 N/A
Early Flush N/A N/A 1.2
Buffering & Early Flush 15.5s 9.8 1.2
8 Buffering 13.9s 14.1 N/A
Early Flush N/A N/A 1.4
Buffering & Early Flush 13.2s 16.1 1.5
Buffering in the VMM can result in additional delays
The longer the write resides the buffer, the higher the impact
on reliability
Xen Summit at AMD April 28-29, 2010 23
25. 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
Xen Summit at AMD April 28-29, 2010 24
26. Q&A
Thank You
Xen Summit at AMD April 28-29, 2010 25