disks is421. disk a disk consists of read/write head, and arm a platter is divided into tracks and...
TRANSCRIPT
DISKS
IS421
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”
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
About Disks
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?
Queuing
When a drive is accessed faster than it can handle, queuing will occur, and the latency will increase.
Maintain High Performance
Isolate sequential I/O operations Transaction log is sequential
Distribute random I/O operations
Study the data access pattern
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
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
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)
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
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
RAID 0
No fault tolerance because no redundancy
Improve performance because concurrent read operations
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)
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
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
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
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
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
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
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
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?
RAID 5 VS. RAID 10 On Writing
Comparing 500 I/O operations per second over 10 disks
RAID Summary