1 / 14

CS4432: Database Systems II

CS4432: Database Systems II. Lecture #3 Using the Disk, and Disk Optimizations. Professor Elke A. Rundensteiner. Thus far :. Hardware: Disks Architecture: Layers of Access Access Times and Abstractions. Optimizations (in controller or O.S.). Disk Scheduling Algorithms

craigdiaz
Download Presentation

CS4432: Database Systems II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Thus far : Hardware: Disks Architecture: Layers of Access Access Times and Abstractions lecture #3

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

  4. One Simple Idea : Prefetching Problem: Have a File • Sequence of Blocks B1, B2 Have a Program • Process B1 • Process B2 • Process B3 ... lecture #3

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

  6. Say P = time to process/block R = time to read in 1 block n = # blocks Single buffer time = n(P+R) lecture #3

  7. 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 ? lecture #3

  8. process process B C B A A A B C D E F G done done Idea : Double Buffering/Prefetching Memory: Disk: lecture #3

  9. Say P  R P = Processing time/block R = IO time/block n = # blocks What is processing time now? • Double buffering time = ? lecture #3

  10. Say P  R P = Processing time/block R = IO time/block n = # blocks • Double buffering time = R + nP • Single buffering time = n(R+P) lecture #3

  11. Disk Arrays RAIDs (various flavors) Block Striping Mirrored logically one disk lecture #3 Notes 2 11

  12. On Disk Cache P ... ... M C cache cache lecture #3 Notes 2 12

  13. Block Size Selection? • Question : Do we want Small or Big Block Sizes ? • Pros ? • Cons ? lecture #3

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

More Related