disks is421. disk a disk consists of read/write head, and arm a platter is divided into tracks and...

24
DISKS IS421

Upload: adele-wilkerson

Post on 26-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

DISKS

IS421

Page 2: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

DISK

A disk consists of Read/write head, and arm

A platter is divided intoTracks and sector

The R/W heads can R/W at the same time Over the same point on all platters as the same

time The data is stored in “Cylinders”

Page 3: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Latency

Rotational latencyUp to 6 ms (10000 rpm )rpm -- revolutions per minuteUp to 8.3 ms (7200 rpm)

Seek timeIt takes time to move from track to track

Page 4: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

About Disks

Page 5: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

I/O Operation Cost

Seek time Rotational latency Data transfer time Sequential I/O

Accessing adjacent data (track to track seek) 250 I/O operations per second

Random I/O Reading from various parts (random seek) 85 I/O operations per second

Elevator seek

Why defragment?

Page 6: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Queuing

When a drive is accessed faster than it can handle, queuing will occur, and the latency will increase.

Page 7: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Maintain High Performance

Isolate sequential I/O operations Transaction log is sequential

Distribute random I/O operations

Study the data access pattern

Page 8: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID

Stand for Redundant Array of Independent/Inexpensive Disks

Has two or more physical disks To the OS it can be one logical disk (disk

volume) Can be implemented through S/W Generally, we prefer H/W based

Page 9: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

I/O Subsystems

Controller Cache RAM on the controller to server as buffer (W) or cache (R) A battery is need for write caching Write caching can degrade performance when the RAID is near its

capacity empty the cache has the highest priority Disk Drive Caches

Few KB for elevator sorting Not for caching large amount of data Controllers do not have control over the cache, except (some can)

turning it off Internal vs. external RAID

Internal RAID, the RAID logic is on the card inside the box External RAID, the RAID logic is on the disk or the store unit

Page 10: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Storage Area Networks (SAN)

A networked set of servers shares an external RAID system

Benefit Clustering Storage consolidation Reduction of wasted space Fault tolerance

Other issues Controller and Bus bandwidth High End I/O subsystem (EMC) Elevator sorting Disk reliability (They will fail, not IF but WHEN)

Page 11: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Common RAID Levels

RAID level 0 – 5 are standard RAID Level 10 is a combination of 0 and 1 We will study levels 0, 1, 5, and 10 RAID is used to solve the following issues

CostFault tolerancePerformance

There isn’t one that score high on all three

Page 12: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

General Idea Of RAID

The size of the block/strip can be defined by users with some controller. For others, it is defined by the controller

Page 13: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 0

No fault tolerance because no redundancy

Improve performance because concurrent read operations

Page 14: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 1 Offer fault tolerance due to the

mirroring Improve performance

because concurrent read operations and split seeks (where the head can be at different spot at the seeking time)

Expensive write operations because you have to write two disks

Low utilization of disk space (saving everything twice)

Page 15: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 1 Recommendations

For OSRebuild OS is hardOS fits on one disk

For transaction logCan benefit from the sequential writes

Use write caching Using write caching to improve the writing

performance

Page 16: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 5 Offer fault tolerance by using parity The parity data is rotated among all the

disks Tolerate failure of any one disk Recoverable from a single disk failure Increase storage space with relatively

little costs Improve performance because

concurrent read operations Expensive write operations because

you have to read the data and parity and write the data and parity

Great for system with 90% or more read operations

Page 17: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 5 Recommendations

For system with large volume of storage space

For system with a lot of reading (documentation server, web server, etc)

Use write caching Using write caching to improve the writing

performance

Page 18: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

How Parity Works

Initially, all the data is zero, so is the parity bit When write a bit, both the data and parity are read

first Using XOR to determine the parity For example,

Changing from 0 to 1 with parity bit being 0

(0 1) 0 1, so the new parity bit is 1Changing from 0 to 1 with parity bit being 1

(0 1) 1 0, so the new parity bit is 0

Page 19: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 10 It is a combination of RAID 1 and

RAID 0 (so it is 10) Offer fault tolerance by using

mirroring Tolerate failure/recoverable of

any one disk or one cabinet Increase storage space with

relatively costing approaches Improve performance because

concurrent read operations and split seeks

Expensive write operations because you have write to two disks, but much batter than RAID 5

Page 20: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 10 Recommendations

For systems need large volume of storage space

For systems need more than 10% writing For systems need performance Use write caching

Using write caching to improve the writing performance

Page 21: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Comparison on Cost of Random I/O Operations By Different RAID Types

D = number of disk N = number of random I/O

operations per second supported by a disk

1 Each RAID 5 write needs two reads and two writes, to two different disks, so it is possible that the write cost is N/4/2 in the best case

Read Write

RAID 0 N*D N*D

RAID 1 N*2 N

RAID 5 N*(D -1) N/41

RAID 10 N*D N*D/2

Page 22: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

Rate Of I/O Operation Per Disk

D = number of disk R = number of read

operations W = number of write

operations

Rate of I/O operation per disk

RAID 0 (R+W)/D

RAID 1 (R + 2W)/2

RAID 5 (R + 4*W)/D

RAID 10 (R + 2W)/D

If an application require R read and W write operations per second, with different RAID, how many I/O operations a disk has to support?

Page 23: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID 5 VS. RAID 10 On Writing

Comparing 500 I/O operations per second over 10 disks

Page 24: DISKS IS421. DISK  A disk consists of Read/write head, and arm  A platter is divided into Tracks and sector  The R/W heads can R/W at the same time

RAID Summary