




























































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Appunti di Computing Infrastructures in lingua inglese. Argomenti trattati: - Storage: HDD, SSD, RAID, NAS, SAN - Virtual environment: Virtual Machines, Emulation - Performance
Tipologia: Dispense
1 / 68
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































Disks can be seen by an OS as a collection of data block that can be read or written independently.
To allow the ordering/management among them, each block is characterized by a unique numerical
address called LBA (Logical Block Address).
Typically, the OS groups blocks into clusters to simplify the access to the disk.
Clusters : minimal unit that an OS can read from or write to a disk.
Files: a better way to address data on the clusters than LBA numbers.
Clusters contains:
Metadata contains:
We can:
Since the file system can only access clusters, the real occupation of space on a disk for a file is always a
multiple of the cluster size.
Given:
Then, we have:
Optimal: 𝑎 = 𝑠
Commonly: 𝑎 > 𝑠
And the quantity 𝑤 = 𝑎 − 𝑠 is wasted disk space due to the organization of the file into clusters
This waste of space is called internal fragmentation of files.
Ex.
Deleting a file requires:
the O.S.
Disk service time and response time
Service time 𝑠 𝑑𝑖𝑠𝑘
𝑑𝑖𝑠𝑘
1
2
𝑀𝐵
𝑠𝑒𝑐
Response time R: time spent in queue waiting for the resource (that is busy executing other requests) and
for the execution of the request.
Response time is function of the:
Assuming the same mean values of the metrics, the response time increases as the variability increases.
Ex.2.
Read/write of a sector of 512 𝐵𝑦𝑡𝑒 = 0. 5 𝐾𝐵
The previous service times consider only the very pessimistic case where sectors are fragmented on the
disk in worst possible way.
This is true if the files are very small or the disk is very fragmented.
In many circumstances, this is not the case: files are larger than one block, and they are stored in a
contiguous way to decrease the needs of seek and rotational latency times.
Suppose we can measure the data locality of a disk as the percentage of blocks that do not need seek or
rotational latency to be found.
Ex.2.
Read/write of a sector of 512 𝐵𝑦𝑡𝑒 = 0. 5 𝐾𝐵
RAID disk
Redundant Arrays of Independent Disks
The data are striped across several disks accessed in parallel:
Two orthogonal techniques:
I/O virtualization: data are distributed transparently over the disks
Data striping:
blocks) on multiple disks according to a cyclic algorithm
coincide with the number of physical disks in the array – there can be “hot spares”)
queue length (and time) of the disks.
transfer rate of a single request
RAID architectures
N.B. RAID levels can be combined
RAID level 0: striping, no redundancy
Data are written on a single logical disk and splitted in several blocks distributed across the disks according
to a striping algorithm.
Used where performance and capacity, rather than reliability, are the primary concerns, minimum two
drives required.
Pros: lowest cost because it does not employ redundancy and best write performance because it does not
need to update redundant data and it is parallelized
Cons: single disk failure will result in data loss
RAID level 1: mirroring
Whenever data is written to a disk it is also duplicated (mirrored) to a second disk, minimum 2 disk drives.
Pros: high reliability (when a disk fails the second copy is used), read of data (it can be retrieved from the
disk with the shorter queueing, seek and latency delays), fast writes (no error correcting code should be
computed, but still lower than RAID 0)
Cons: high costs (50% of the capacity is used)
In principle, a RAID 1 can mirror the content over more than one disk. This give resiliency to errors even if
more than one disk break. It allows also with a voting mechanism to identify errors not reported by the disk
controller.
NEVER USED IN PRACTICE , because the overhead and costs are too high.
Two organization RAID 0+1 or RAID 1+0 are possible.
The blocks are the same but are allocated in a different order. Some controllers 0+1 execute striping and
mirroring as a single operation.
o Two concurrent disk failures are not tolerated
o After a disk fails, any other disk failure concerning another stripe is a single point of failure
o All the disks of the array are needed to recover the lost information
o One disk failure for each RAID1 group is tolerated, but after this failure any other disk
becomes a single point of failure of the entire array
RAID level 2: bit interleaved parity (not used)
Assumption: the failed component is unknown.
Memory stile ECC, less cost than mirroring but still very high
Number of redundant disks: proportional to the log of the total number of disks.
Parity blocks are computed for several subset of overlapped data.
When a disk fails several of the parity blocks will have inconsistent values, the failed component is the one
held in common by each incorrect subset.
RAID level 3: bit or byte interleaved parity
RAID5 data loss → two disks failed concurrently
Ex.4 - RAID level 5 -
5 physical disks configured as a single logical disk RAID5.
Write op. that update only one block require 5 disk I/Os (read-modify write)
Example: write of a new data in Block
5 disk I/O are required → BAD!
Disk 0 Disk 1 Disk 2 Disk 3 Disk 4
Stripe 1 Block 1 Block 2 Block 3 Block 4 Parity 1- 4
Stripe 2 Block 5 Block 6 Block 7 Parity 5- 8 Block 8
Stripe 3 Block 9 Block 10 Parity 9- 12 Block 11 Block 12
Write new data in Block 1
Only 4 disk I/O are required.
from a CRC (Cyclic Redundancy Check) error. In this case the sector with the error can be
reconstructed from the remaining blocks of the stripe and the parity block.
RAID level 3, 4 and 5 comparison
Raid level 3,4 and 5 have all the same characteristics in terms of overhead, failure protection and total
available capacity.
However, they require controllers gradually more sophisticated:
Currently, with the reduction of the hardware costs, Raid 5 are exactly as expensive as Raid 3 and 4.
For this Raid 3 and 4 are no longer used.
Current controller has also reduced the impact of interleaving, making thus the choice between corse and
fine grained less influent.
RAID level 6
As the size of the disk arrays are increasing, multiple failures become likely: this is due to the longer
recovery times required to consider all the sectors of the disks.
The probability of encountering an URE (Unrecoverable – Uncorrectable Read Error) can be significant.
RAID6: more fault tolerance with respect RAID
Uses Solomon-Reeds codes with two redundancy schemes: (P+Q) distributed and independent 2
concurrent failures are tolerated high overhead for the computation of parities N + 2 disks required with 4
data disks, each write require 6 disk accesses due to the need to update both the P and Q parity blocks
(slow writes) adopted for very critical applications.
N.B. Not efficient when the number of disks is small
When the number of disks increases the loss of efficiency decreases but the probability of 2 concurrent
failures increases, so RAID 6 becomes mandatory.
Let as call 𝐷 𝑖
the i-th data block
, and P and Q the two parity values.
Parity P is computed exactly as in RAID 5:
0
1
𝑛− 1
𝑖
𝑛− 1
𝑖= 0
Parity Q is instead computed using a generator value g:
0
1
𝑛− 1
𝑛− 1
𝑖
𝑖
𝑛− 1
𝑖= 0
Ex.
Disk 0 Disk 1 Disk 2 Disk 3 Disk 4
Stripe 1 Block 1 Block 2 Block 3 P 1- 3 Q 1- 3
Values 2 10 7 19 50
Let as call the 𝐷 𝑖
′ the old data in the i-th block
, and P’ and Q’ the two old paries.
The new parity P can be computed as:
𝑛𝑒𝑤
𝑜𝑙𝑑
𝑛𝑒𝑤
𝑖𝑖
𝑜𝑙𝑑
𝑗−𝑖
𝑗− 1
𝑖
𝑗− 1
The secondary disk, can then be recovered from the first by simply using parity P:
𝑗
∗
𝑖
Ex.5.
Disk 0 Disk 1 Disk 2 Disk 3 Disk 4
Stripe 1 Block 1 Block 2 Block 3 P 1- 3 Q 1- 3
Values 2 10 7 19 50
∗
∗
2 − 1
2 − 1
− 1
𝑗− 1
1
2
DAS (Directed Attached Storage)
DAS is a storage system directly attached to a server or workstation.
The term is used to differentiate non-networked storage from SAN and NAS.
DAS has:
DAS does not necessary mean “internal drives”, all the external disks, connected with a point to point
protocol to a PC can be considered as DAS.
USB and eSATA drive are example of DAS.
The current state of the art connection system for DAS is called SAS – Serial Attached SCSI.
Both DAS and NAS can potentially increase availability of data by using RAID or clustering.
Comparing NAS with local DAS, the performance of NAS depends mainly on the speed of and congestion on
the network.
SAN (Storage Area Network)
SAN are remote storage units that are connected to PC using a specific networking technology.
NAS vs SAN
concerns on the “client” side
o NAS appears to the client OS as file server
o A disk available through a SAN still appears to the client OS as a disk: it will be visible in the
disks and volumes management utilities, and available to be formatted with a file system
In conclusion:
streaming audio/video
SANs have a special network devoted to the accesses to storage devices.
Two distinct networks (TCP/IP and dedicated network)
High scalability
Problems of TCP/IP based storage networks
TCP/IP stack over Ethernet adds several overheads:
This overhead is in most cases not required to transfer disk commands.
Moreover the TCP/IP overhead is proportional to the quantity of data transferred.
A specific protocol can reduce the overhead and increase performance ( fibre channel , a high speed
network technology that is well established in the open system environment as the underlining
architecture of the SAN).
SAN + NAS head
Solid State Disk (SSD)
A solid state drive is a non-volatile storage device.
A controller is included in the device with one or more solid state memory components.
The device should use traditional hard disk (HDD) interfaces and form factors.
Data are stored in array of NAND cells:
o Twice the capacity of SLC using MLC
o Tolerance on adjacent level smaller than SLC → decreasing data reliability
o Pages: smallest unit that can be read/written. In particular: a sub-unit of an erase block
consisting of number of bytes which can be read from and written to in single operations,
through the loading or unloading of a page buffer and the issuance of a program or read
command
o Blocks (or Erase Block): smallest unit that can be erased, typically consisting of multiple
pages
Ex.
Hypothetical SSD:
Let’s write a 4KB text file to the brand new SSD
Now let’s write a 8KB pic file to the almost brand new SSD
Now let’s delete the txt file in the first page
Finally lets write a 12KB pic to the SSD.
How long should it take? 1KB/s write speed
Problems:
So steps:
The OS only thought it was writing 12KB of data when in fact the SSD had to read 12KB and then write
20KB, the entire block.
Since the SSD is quite slow the operation should have taken 12sec but actually took 26sec, resulting in a
write speed of 0.46KB/s and not 1KB/s!
SSD drawbacks
o Have a shorter lifetime
o Error correcting codes
o Over-Provisioning
Definitions
following the previous write
meeting the requirements
to the SSD
number of data error per bits read
Trim command
As we have seen, deleting a file only updates the meta data:
solid-state drive, such as blocks released after deleting one or more files
be able to know which blocks to delete