Check out the new USENIX Web site. next up previous
Next: RVM Benchmark Up: Performance Previous: Performance

   
Micro-benchmarks


 
Table: Comparison of critical path latencies. The total columns show the total microseconds spent in each event. Trap columns show the overhead needed to pass control to the signal handler (on Digital UNIX) or to the Rhino page fault handler (on SPIN). Begin and commit for the UNIX implementation are implemented in the user space, and they issue multiple system calls. Thus, only the total elapsed times are shown.
  UNIX SPIN
Event total trap other total trap other
null call 2.14 2.14 - 6.11 6.11 -
begin 55.4 - - 26.4 9.4 14
commit (ro) 152.3 - - 29.7 13.4 16.3
commit (8byte) 14200 - - 13328 15.2 13313
page fault (read, warm) 282.4 134 148.4 55.3 13.5 41.8
page fault (write, warm) 234.3 133 101.3 68.8 16.5 52.3
page fault (read, cold) 2881 131 2750 2272 20 2252
page fault (write, cold) 3059 113 2946 3054 19.7 3034
 

This section compares the micro-benchmark performance of SPIN-based Rhino and Digital UNIX-based Rhino to show how the extension architecture of SPIN improves the performance of critical functions. Table 2 shows the time breakdown of some important events.

Null call indicates a null system call overhead (on Digital UNIX, we measured the latency of getpid). SPIN is slower than Digital UNIX, because the implementation of system call in SPIN requires the use of additional mechanisms to protect the kernel from the runtime failure of an extension [unixemul].

Begin shows the latency of trans_begin. Commit(ro) is the time to commit a read-only transaction. Commit(8byte) is the time to commit a transaction that modified 8 bytes on a single page. Page diffing is used during commits.

Four numbers are shown for page faults. ``Read'' faults are caused by load instructions, and ``write'' faults by store instructions. ``Warm'' faults occur when database contents are in main memory. Thus, these are times with no disk I/O. ``Cold'' faults occur when database contents are not in main memory and require pages to be read from the disk.

The SPIN version outperforms the UNIX version for all events except the null call. The performance difference is largest for warm page faults. There are two reasons for this: (1) since the page fault handler in SPIN runs in the kernel address space, it can eliminate most of the user-kernel crossings, and (2) page table manipulation in SPIN is more efficient than mprotect used in Digital UNIX. In SPIN, MMU can be manipulated by rewriting the MMU page table directly. On the other hand, mprotect requires more work, because it must manipulate the memory object map data structure to make its effect persist regardless of paging activity.


next up previous
Next: RVM Benchmark Up: Performance Previous: Performance
Yasushi Saito
1998-04-27