Top Banner
RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale
32

RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Dec 30, 2015

Download

Documents

Millicent Flynn
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

RAPID-Cache – A Reliable and Inexpensive Write Cache for

Disk I/O Systems

Yiming Hu

Qing Yang

Tycho Nightingale

Page 2: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Contents

Introduction Architecture and Operations Simulation Simulation Results Reliability Analysis Conclusion Questions

Page 3: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Introduction

Modern Disk I/O systems make extensive use of non volatile RAM write cache

Advantages

- Response Time is reduced

- Improves System Throughput Disadvantages

- Poor reliability and High cost

Page 4: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Introduction(contd..)

Standard Dual-Copy write cache has a symmetric structure

A new disk cache architecture – RAPID-Cache Primary Cache and Backup Cache Backup cache can achieve same write speed as

primary cache Reliability is high and system is inexpensive

Page 5: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Architecture

Primary RAM cache Backup Cache - Small Non volatile RAM - Cache Disk I/O write operations sent to

both primary and backup cache

Read operations are performed using primary cache only

Page 6: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Architecture – Backup Cache

LRU cache – frequently accessed data

Cache disk – less frequently accessed data

- Data in the form of segments - Segments contain slots - Each slot can hold one data block Data blocks - Segment and

Slot IDs

Page 7: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Backup Cache(contd..)

Data Blocks in LRU cache are addressed by their Logical Block Addresses

Hash Table contains location information for each of the valid data blocks

Total number of valid data blocks is same as in primary cache

Cache Disk – Physical or Logical Disk

Page 8: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Physical Cache-Disk

Page 9: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Logical Cache-Disk

Page 10: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Operations

Write Read Destage Garbage Collection Error Handling and Availability

Page 11: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Write

Controller invalidates any data copy in read cache

Data sent to primary and LRU cache If space is available, then data is copied to

both caches Hash entry created in Backup Cache Acknowledgement sent to host

Page 12: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Write(contd..)

If there is no space in the primary cache, then - Controller first tries to discard a clean block If no clean block is found,then - Controller chooses the LRU data block and writes it to RAID Space in primary cache is freed for incoming request Copy of replaced data in secondary cache is

invalidated

Page 13: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Write(contd..)

If LRU cache in the backup cache is full,then - Controller picks empty segment buffer and sets it as current segment buffer LRU data block copied to the segment buffer Cache space used by LRU data block is safely

freed to accept the incoming request Following write requests evict LRU data

blocks until segment buffer is full

Page 14: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Write(contd..)

Controller then writes contents of segment buffer into the cache-disk segment in one large write

Controller switches to another empty segment buffer and continues operation

Small NVRAM cache and large cache-disk appear as a large NVRAM write cache

Page 15: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Read

When a read request comes,

- Read cache and Primary write cache

are searched If a cache hit occurs,

- Data returned immediately If a cache miss occurs,

- LRU block in read cache is discarded and its

buffer space is freed

Page 16: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Read(contd..)

Requested data read from RAID system into freed LRU block and then returned

Backup cache is not involved in read operations

Page 17: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Destage

Destaging is the process of writing dirty data in the write cache into the RAID system and this normally happens in the background

RAID system with RAPID-Cache requires destaging

Page 18: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Destage(contd..)

Destaging threads are initiated when,

- Controller detects an idle period

- When number of dirty blocks in the

primary cache exceeds 70% of the

cache capacity Threads find a dirty LRU block in the primary

cache

Page 19: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Destage(contd..)

Dirty block in the primary cache is marked “clean”

Same data block in the backup cache is invalidated

Invalidation involves, - Releasing LRU buffer - Marking segment slot as “invalid” - Deleting hash entry from the hash table

Page 20: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Destage(contd..)

Threads continue until idle period is over or dirty blocks in primary cache falls below 30% of the cache capacity

Backup cache data is never read or written

Slow speed of cache disk will not affect destaging process

Page 21: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Garbage Collection

Segments in cache-disk may become fragmented

No need to read data from cache-disk Controller searches Disk Segment table It copies corresponding data from primary

cache to a segment buffer in the RAM Finally controller writes whole contents of

segment buffer to a new disk segment

Page 22: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Error Handling

Excellent reliability because of data redundancy During power failure period, data cached in the cache

disk is much safer than in NVRAM RAPID-Cache system has excellent availability If one cache partition of a logical cache-disk crashes,

whole system can operate continuously If NVRAM of backup cache fails, a small portion of

the primary cache can be borrowed

Page 23: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Simulation

RAPID-Cache simulator is built on top of a general cached-RAID5 simulator

Disk simulator provides detail simulation, including SCSI bus contention, built in cache read-ahead and write behind

It is assumed that RAID controller has a high-speed 80 MB/sec fibre channel bus connected to the host and it can handle up to 32 pending requests

Cache block size is 8 KB

Page 24: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Simulation(contd..)

Purpose of the simulation is to show that RAPID-Cache can deliver same performance as very expensive NVRAM caches under various workloads

Two sets of trace files were used

- Real-word traces

- Synthetic traces

Page 25: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Simulation Results

Page 26: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Simulation Results(contd..)

Page 27: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Simulation Results(contd..)

Page 28: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Reliability Analysis

Reliability of the cache systems is analyzed based on exponentially distributed failures and repairs

MTTFNVRAM and MTTFdisk – Mean Time To Failure Rate

SPrimeC and SbkupRAM – Size of primary cache and NVRAM in the backup cache respectively(in terms of memory modules)

Page 29: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

NVRAM Primary Cache

Page 30: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

DRAM Primary Cache

Page 31: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Conclusion

RAPID-Cache consists of an asymmetrical parallel architecture that has a fast-write-fast-read primary cache and a fast-write-slow-read backup cache

It is possible to configure RAPID-Cache to optimize reliability and system cost

Low cost feature of RAPID-Cache makes it possible to use a very large primary cache to achieve very high performance

Page 32: RAPID-Cache – A Reliable and Inexpensive Write Cache for Disk I/O Systems Yiming Hu Qing Yang Tycho Nightingale.

Questions

Explain the structure of Backup Cache in the RAPID-Cache system.

How is a write request handled in RAPID-Cache?

Analyze the reliability of NVRAM Primary Cache.(What is MTTDL of NVRAM Primary Cache?)