Information Technology Reference
In-Depth Information
for the transactional approach is the time for the first two steps:
logging the updates and then logging the commit: 10.24 ms +
10 ms = 20.24 ms.
Although small writes using redo logging may actually see performance ben-
efits compared to update in place approaches, large writes may see sigificant
penalties.
Example: Performance of large-write transactions.
Question: Considering the same disk and approaches as in the example
above, compare the total time to for 100 writes, but now assume
that each of the 100 writes updates a randomly selected 1 MB
range of sequential sectors.
Answer: For the update in place approach, the time for each update is ap-
proximately average seek time + 0.5 rotation time + transfer time
= 5 ms + 5 ms + transfer time. We will assume that the band-
width for an average transfer is 75 MB/s—between the 50 MB/s
and 100 MB/s inner and out tracks' transfer rates. So, we esti-
mate the average transfer time to be 100 MB/75 MB/s = 1.333 s,
giving a total time of .005 s + .005 s + 1.333 s = 1.343 s per
request and 134.3 s for 100 requests.
For the transactional approach, our time will be time to log up-
dates + time to commit + time to write back.
For logging the updates, we'll assume a reasonably efficient en-
coding of metatadata that makes the size of the metadata for a
100 MB sequential update negligible compared to the data. So,
logging the data will take seek time + rotational latency + transfer
time = 5 ms + 5 ms + 100 * 100 MB/100 MB/s = .005 s + .005 s
+ 100 s 100 s.
Writing the commit adds another 10 ms as in the above example.
Finally, as above, doing the write-backs estimated scheduled
seek time + estimated scheduled latency + transfer time = 1.0 ms
+ 2.5 ms + 100 MB/75 MB/s, giving a total of 1.337 s per request
and 133.7 s for 100 requests.
Adding the data logging, commit, and writeback times together,
the transactional approach takes about 233 seconds while the
update in place approach takes about 134 seconds. In this case
transactions do impose a significant cost, nearly doubling the
total time to process these updates.
Question: Now compare the latency from when the call making the 100
writes is issued until it may safely return.
Search WWH ::




Custom Search