Physical Storage(2020) Flashcards
(42 cards)
Data Storage:
Major Topics
- Levels of Storage
- Evaluating Storage
- Magnetic Disk Physical Components
- Data Organization
- RAID
- Techniques
- Issues
Physical Storage:
Storage Levels
- Primary
- Cache
- Main Memory
- Secondary
- Flash Memory
- Magnetic Disk
- Tertiary
- Optical Disk
- Magnetic Tapes
Primary Storage
Devices
- Cache
- Main Memory
Secondary Storage
Devices
- Flash Memory (SSD)
- Magnetic Disk (Hard Drive)
Tertiary Storage
Devices
- Optical Disk
- Magnetic Tapes
(Basically any external, sturdy storage)
Storage Devices:
Cache Overview
- Primary Storage Level
- Fastest form of storage
- Volatile - only used temporarily
- Managed by the computer system hardware
- Typically multiple levels of cache
Storage Devices:
Main Memory Overview
- Primary Storage Level
- Fast Access
- 10s to 100s of nanoseconds
- Generally too small/expensive to store entire databases
- Typically RAM
- Volatile
- Usually lost if power is lost
Storage Devices:
Flash Memory Overview
- Secondary Storage Level
- Reads are roughly as fast at main memory
- Non-volatile
- Limited number of read/writes (10k - 1M)
- When erasing, has to wipe entire block of memory
- Write is SLOW(Micro seconds)
- Erase is slower
- USB sticks, cameras, phones, etc
Storage Devices:
Magnetic Disk Overview
- Secondary Storage Level
- Non-volatile
- But disk failure can still destroy data
- Stored on spinning disk
- Read/writes magnetically
- Primary means of long term storage for databases
- Must be moved to memory for read/write (VERY SLOW)
- Can read in any order
- Rather cheap and large amounts of storage
Storage Devices:
Optical Storage Overview
- Tertiary Storage Level
- Non-volatile
- Read from physical disk using a laser
- CD, DVD and Blu-Ray most popular forms
- CD is the smallest
- Some are write once, read many - (CD-R)
- Some are many writes, many reads - (CD-RW)
- Slower than magnetic disk
- “Juke Box” systems were used to store disks
Storage Devices:
Tape Storage Overview
- Tertiary Storage Level
- Non-volatile
- Backup and archival data
- Sequential access
- Extremely slow
- Very High capacity
- Tape jukeboxes can store petabytes of data
Magnetic Disk:
Components
- Platter (disks)
- Divided into circular “Tracks”
- Tracks broken into “Sectors”
- Spindle
- Read-Write Head
- Arm Assembly
Magnetic Disks:
Read/Write Head
- Very close to the platter, almost touching
- Reads and writes data
Magnetic Disk:
Platter
- Disk is split into multiple “Platters”
- Each platter is divided into circular Tracks, line lanes
- Over 50-100K Tracks per Platter
- Tracks are broken into Sectors, chunks of lanes
- Smallest unit of data that can be written
- Typically 512 bytes
- More on outer edge of platter
Magnetic Disk:
Reading and Writing
- Reads/Writes accomplished via the Read/Write Head
- After Write, there is a checksum
- Read again, and check
Magnetic Disk:
Disk Subsystem Overview
- Multiple Disks are connected to a computer through a main controller
- Controller manages the “big picture”
- Individual disks usually handle checksums, etc
Magnetic Disk:
Types of Disk Subsystems
-
SAN - Storage Area Networks
- Connected via high speed network to servers
-
NAS - Network Attached Storage
- Uses network file system protocol
- Allows for storage like a file system
Evaluating Storage:
Concerns/Factors
Storage Evaluation:
Access Time
The time it takes from issuing read/write command to when data transfer actually begins.
Factors:
- Seek Time
- Time to position arm over correct track
- ~4-10 ms
- Rotational Latency
- Time it takes for sector to appear under head
- ~4-11 ms, depending on how fast disk spins
Storage Evaluation:
Data Transfer Rate
The rate at which data can be stored or retrieved
- Depends on the controller rate
- SATA vs Fiber connections may limit if multiple disks share
Storage Evaluation:
MTTF
Mean Time To Failure
- Average time that a disk is expected to run continuously without any failure
- Typically 3-5 years
- Decreases as the disk ages
- If the MTTF is 1,200,000 hours:
- Given 1000 new disks, on average one will fail every 1200 hours
Block:
Definition and overview
A Block is a contiguous sequence of sectors from a single track
- Data is transferred from disk to memory in blocks
- Smaller blocks = more reads from disk
- Larger blocks = more wasted space
- The Elevator Algrorithm is used to schedule reads and writes
File Organization
Overview
- Related information is stored nearby
- Files may get fragmented over time:
- Parts of file deleted
- Free blocks are scattered, a new file is scattered
- Increases seek time
- Defragmenting a hard drive can improve speeds
Non-volatile Write Buffers
- Basic Idea:
- Write blocks to battery backed up RAM or flash memory BEFORE writing to disk
- Controller can write to disk when it has nothing else to do, or a task has been in RAM for a while
- Database operations can continue without waiting for data to be written to disk
- Write orders can be optimized before going to disk