0% found this document useful (0 votes)
99 views2 pages

CSC 443

This document discusses and compares the performance of read and write speeds using different page sizes for disk input/output (I/O). It shows that write and read speeds peak at around 16kB page size, similarly to results from a previous blocked disk I/O experiment. Variable length record encoding would be around 1.5 times slower than fixed length due to additional bytes used for offsets and null characters. Page-based formatting is superior to comma-separated value (CSV) files because it saves space, allows efficient record location, and allows modifying partial pages without rewriting the entire file. However, page-based organization requires unused space indicators that reduce storage efficiency.

Uploaded by

sch123321
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views2 pages

CSC 443

This document discusses and compares the performance of read and write speeds using different page sizes for disk input/output (I/O). It shows that write and read speeds peak at around 16kB page size, similarly to results from a previous blocked disk I/O experiment. Variable length record encoding would be around 1.5 times slower than fixed length due to additional bytes used for offsets and null characters. Page-based formatting is superior to comma-separated value (CSV) files because it saves space, allows efficient record location, and allows modifying partial pages without rewriting the entire file. However, page-based organization requires unused space indicators that reduce storage efficiency.

Uploaded by

sch123321
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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.

You might also like