tradi6onal storage hierarchy main memory ram for

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: DavisDB I/O efficiency contest: minimize total READS and WRITES Why Not Store Everything in Main Memory? •  Tradi6onal arguments: •  It costs too much. In 1995, $1000 would buy you either 128MB of RAM or 7.5GB of disk. •  Main memory is vola3le. We want data to be saved between runs. (Obviously!) •  Tradi6onal storage hierarchy: •  Main memory (RAM) for currently ­used data •  Disk for the main database (secondary storage) •  Tapes for archiving older versions of the data (ter6ary storage) •  DavisDB follows tradi6onal model (minus the tapes  ) •  Discussion: do the tradi6onal arguments s6ll hold water? Disks and Paged Files •  Secondary storage device of choice •  Main advantage over tapes: random access versus sequen3al •  Data on hard disks is stored and retrieved in units called disk blocks or (as we'll term them in DavisDB) pages •  Unlike RAM, 6me to retrieve a disk page varies depending upon loca6on on disk… •  …therefore, rela6ve placement of pages on disk has major impact on DBMS performance! •  For simplicity, we'll overlook this in DavisDB •  File is organized as a sequence of pages Buffer Management •  Main memory is limited •  Pages of disk files move in/out of in ­memory buffer pool •  DavisDB # pages in buffer pool = 40 •  Total buffer size (40 pages @4K pages) = 160K (6ny!) Disk Space Management •  Lowest layer of DBMS sovware manages space on disk •  Higher levels call upon this layer to: –  allocate / de ­allocate a page –  read / write a page •  Request for a sequence of pages must be sa6sfied by alloca6ng the pages sequen6ally on disk! Higher levels don't need to know how this is done, or how free space is managed –  Simplifying assump6on in DavisDB: no requests for sequences; pages are accessed one at a...
View Full Document

This document was uploaded on 03/12/2014 for the course CSCI 165B at UC Davis.

Ask a homework question - tutors are online