Sie sind auf Seite 1von 2

Part3 1. Plot the performance (records / second) versus page size for write and read.

Write Speed(Records/s) vs Page Size(B)


6200 6100 6000 5900 5800 5700 5600 5500 5400 0 20000 40000 60000 80000 100000 120000 Series1

Read Speed(Records/s) vs Page Size(B)


80000 70000 60000 50000 40000 30000 20000 10000 0 0 50000 100000 150000 Read Speed(Records/s) vs Page Size(B)

2. Compare this to the blocked disk I/O characteristics you measured in the previous assignment. The trend/effect of page size on write and read speed is not as obvious as the blocked disk I/O experimented in previous assignment. However, some

similarities can still be seen. On a 7200RPM HDD, writes are fastest at 16kB block size. Reads are also relatively fast at 16kB block size. 3. Based on your observation, approximate the performance difference if variable length record encoding is used. Justify your answer. The performance will be lower if variable length record encoding is used. It should be around 1.5 times slower than fixed length encoding. This is because variable length encoding uses additional 500 bytes as offsets and null characters, hence in a single page I/O, the number of records written onto disk is 1.5 times lower. 4. Discuss why page based format is superior to storing records using a CSV file. a. In fixed length encoding, using page file saves memory and disk space (instead of using commas to separate fields and newline characters to separate tuples, each of 1B, we only need 1 bit for each record. b. Page based format allows database to efficiently locates a record. c. Page based format allows for half-filled page, and addition/deletion/modification of content in a page, without the need to rewrite the whole file onto disk. In CSV, when one changes some data, one needs to rewrite the entire file onto disk. d. Can commas cause problems? 5. Discuss the short comings of the way we organize pages. a. It requires the last few slots of the page to be used as indicators for used/free slots. This reduces the efficiency of space.

Das könnte Ihnen auch gefallen