32
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

Embed Size (px)

Citation preview

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

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

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

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

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

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

Physical Cache-Disk

Logical Cache-Disk

Operations

Write Read Destage Garbage Collection Error Handling and Availability

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

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

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

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

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

Read(contd..)

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

Backup cache is not involved in read operations

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

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

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

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

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

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

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

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

Simulation Results

Simulation Results(contd..)

Simulation Results(contd..)

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)

NVRAM Primary Cache

DRAM Primary Cache

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

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?)