DBMS - Persistence Flashcards
HDD
- Offer data persistence
- Inexpensive but fragile
Offer direct and sequential access but have slow access speeds and limited bandwidth.
Organization based on block
High level components of disk drive
Controller, Memory, Recording Channel, Actuator UCM control, Spindle motor control
Multi Zoning
Outer tracks have more sectors in a HDD platter because circumference is larger
Sector
Smallest unit of data that can be read or written to a disk
Cluster
Smallest unit of data that a file system can allocate to a file, each cluster has fixed size thats a multiple of sector size.
Fie stored optimally as a series of contiguous clusters
When file is split into multiple fragments we can have external fragmentation.
Track
Concentric ring of sectors on a platter. R/W head can read all data from a track by moving to a position and rotating platter.
Cylinder
Group of tracks in all platters that are on top of each other.
Rotational latency
On average half the time of a complete turn
Hard disk IO timings
Time of IO: TIO = Tseek+Trotation+Ttransfer
Rate of IO
rate of IO is size of data over time
Cluster typical size
4096 bytes
Why is the track important
It holds all sectors from a disk platter that can be read without moving the actuator from a surface.
Why is the cylinder important
total storage accessible for r/w without moving actuators i.e only one seek time required. There are as many cylinders as tracks
Fastest way to read blocks
In a sequential stream as opposed to direct mode.
Track skew
Angular offset should be long enough to be just greater than seek time required. Sequential scans that overlap cylinders are avoiding rotational delay.
Interleaving
Jump should be long enough to be just greater than transfer time required.
Average disk seek time
1/3 of full seek time
Generic Disk Requirements (Data servers)
High RPM, low seek time, high transfer bandwidth
Generic Disk Requirements (PC)
Capacity and low cost
Generic Disk Requirements (Laptop)
Sturdy and low power consumption
How to read HDD numbers
- Read disk parameters like Transfer size, seek time, RPM, Transfer Rate, Cache
- Controller overhead is 2ms
- If disk is idle it has no queue delay
- Avg. disk access time for a sector is Avg. seek+Avg. rotational delay + transfer time + controller overhead
- Advertised seek time assumes no locality, actual typically 1/4 advertised time
Comparing Rate of Growth in Capacity with rate of progress in seek
Continue advance in capacity and bandwidth but slow improvement in seek and rotation.