Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 4432lecture #31 CS4432: Database Systems II Lecture #3 Using the Disk, and Disk Optimizations Professor Elke A. Rundensteiner.

Similar presentations


Presentation on theme: "CS 4432lecture #31 CS4432: Database Systems II Lecture #3 Using the Disk, and Disk Optimizations Professor Elke A. Rundensteiner."— Presentation transcript:

1 CS 4432lecture #31 CS4432: Database Systems II Lecture #3 Using the Disk, and Disk Optimizations Professor Elke A. Rundensteiner

2 CS 4432lecture #32 Thus far : Hardware: Disks Architecture: Layers of Access Access Times and Abstractions

3 CS 4432lecture #33CS 245Notes 23 Optimizations (in controller or O.S.) Disk Scheduling Algorithms –e.g., elevator algorithm Larger Buffer Pre-fetch Disk Arrays Disk Cache

4 CS 4432lecture #34 One Simple Idea : Prefetching Problem: Have a File » Sequence of Blocks B1, B2 Have a Program » Process B1 » Process B2 » Process B3...

5 CS 4432lecture #35 Single Buffer Solution (1) Read B1  Buffer (2) Process Data in Buffer (3) Read B2  Buffer (4) Process Data in Buffer...

6 CS 4432lecture #36 SayP = time to process/block R = time to read in 1 block n = # blocks Single buffer time = n(P+R)

7 CS 4432lecture #37 Question: Could the DBMS know something about behavior of such future block accesses ? What if: If we knew more about the sequence of future block accesses, how could we do better ?

8 CS 4432lecture #38 Idea : Double Buffering/Prefetching Memory: Disk: ABCDGEFA B done process A C B done

9 CS 4432lecture #39 Say P  R What is processing time now? P = Processing time/block R = IO time/block n = # blocks Double buffering time = ?

10 CS 4432lecture #310 Say P  R P = Processing time/block R = IO time/block n = # blocks Double buffering time = R + nP Single buffering time = n(R+P)

11 CS 4432lecture #311Notes 211 Disk Arrays RAIDs (various flavors) Block Striping Mirrored logically one disk

12 CS 4432lecture #312Notes 212 On Disk Cache P MC... cache

13 CS 4432lecture #313 Block Size Selection? Question : Do we want Small or Big Block Sizes ? Pros ? Cons ?

14 CS 4432lecture #314 Block Size Selection? Big Block  Amortize I/O Cost –For seek and rotational delays are reduced … Big Block  Read in more useless stuff! and takes longer to read Unfortunately...

15 CS 4432lecture #315 Trend As memory prices drop, blocks get bigger... Trend


Download ppt "CS 4432lecture #31 CS4432: Database Systems II Lecture #3 Using the Disk, and Disk Optimizations Professor Elke A. Rundensteiner."

Similar presentations


Ads by Google