Databases Reference
In-Depth Information
Disk access time is becoming much faster with new technologies, and currently we
can estimate the access time to a 4 KB block to be well below 10 ms in a shared-disk
environment. For example, an IBM U320 146 GB hard drive has an average seek time
of 3.6 ms, average rotational delay of 2 ms for a half rotation (at 15,000 RPM), and a
transfer rate of 320 MB/sec. For this disk, the expected block access cost in a shared-
disk environment is:
I/O time (4 KB block access in a shared disk)
= 3.6 ms + 2 ms + 4 KB/320 MB/sec = 5.6 ms.
I/O time (64 KB prefetch buffer in a shared disk)
= 3.6 ms + 2 ms + 64 KB/320 MB/sec = 5.8 ms.
In a dedicated disk environment, the disk-seek component is rarely needed, so the
time is considered negligible.
I/O time (4 KB block access in a dedicated disk)
= 2 ms + 4 KB/320 MB/sec = 2.0 ms.
I/O time (64 KB prefetch buffer access in a dedicated disk)
= 2 ms + 64 KB/320 MB/sec = 2.2 ms.
A.2 I/O Time Cost—Table Scans and Sorts
Disk technologies that create higher speeds plus special prefetching hardware can also
make table scans and sorting operations extremely efficient. The total I/O time for a full
table scan is computed simply as the I/O time for a single block or prefetch buffer,
whichever applies, times the total number of those I/O transfers in the table.
Sorting, which is a part of many queries, especially those needing a sort-merge join,
has progressed well beyond the simple two-way sorts of the past. The estimated cost of
an M-way sort is approximately 2 × nb × log M nb , where nb is the number of blocks in
the table to be transferred to memory from disk [O'Neil 2001, Silberschatz 2006]. In
the examples in this topic, we use M = 3 to represent three-way sorts.
A.3 Network Time Delays
Network delays can be significant compared to I/O delays, and when data is accessed
across a network, the following model can be used, which is very similar to the disk I/O
model.
Search WWH ::




Custom Search