Check out the new USENIX Web site. next up previous
Next: Comparison to previous design Up: Controlling memory overhead Previous: Reactive cost-benefit analysis

Evaluation of memory control

Figure 5 shows the performance benefit of memory control for our swapping applications. For our benchmarks, memory control only has a significant effect for Sphinx. This indicates that, as desired, memory control does not diminish the performance benefit of speculative execution when speculative execution is effective.

Figure 5: Overall benefit of memory control for swapping applications (with the default machine configuration).
\includegraphics[width=3in]{mem}

Figure 6 shows Sphinx results when the system is configured to have differing amounts of usable memory. In all memory configurations, our mechanism provides some benefit to Sphinx as compared to having no memory control mechanism. Moreover, in 56MB and 64MB configurations, memory control is able to eliminate, or significantly reduce, the performance penalty that occurs without memory control. These results suggest that this mechanism can effectively prevent speculative execution from harming performance in cases where speculative prefetching has too few resources to provide benefit. This is an important requirement if a prefetching system is to be deployed ubiquitously in a system.

Figure 6: The effect of memory control on the Sphinx benchmark, for a range of memory configurations. Run times for each memory size are normalized to the execution time with no speculation. These times are shown above the corresponding bar, in seconds.
\includegraphics[width=3in]{mem}

From the detailed information listed in Table 5, it is evident that much of the performance benefit comes from reduced stall time. However, further gains are possible due to reduced memory contention in the absence of speculative execution. This will, for example, reduce the number of soft page faults experienced by normal execution for pages which are in the process of being laundered, and can also reduce the cost of page allocations.

Table 5: The effect of memory control on synchronization attempts (Syncs) and I/O stall time. Three sets of results are shown for each memory configurations: speculation disabled, speculation enabled, and speculation with memory control (M) enabled. Threshold crossings is the number of times speculative execution is disabled due to intolerable memory overhead. Execution times without speculative execution are shown in Figure 6.
Mem Spec M Threshold Syncs Stall
size crossings time
Off - - - 315s
48 MB On N - 18303 224s
On Y 15 14790 218s
Off - - - 106s
56 MB On N - 8356 102s
On Y 12 1963 101s
Off - - - 43s
64 MB On N - 3337 47s
On Y 10 1979 41s
Off - - - 34s
72 MB On N - 2282 25s
On Y 4 957 23s
Off - - - 28s
80 MB On N - 1955 21s
On Y 5 729 20s


However, the adverse effects of speculative execution can linger for some time after it has been disabled, as the resulting `gap' in memory cannot be immediately filled with useful data. Furthermore, in estimating overhead, our mechanism currently assumes average stall times. Actual stall times can vary greatly, which is why memory control does not entirely eliminate the penalty of speculative execution in our 64MB results.

Our mechanism disables speculative execution quite infrequently. However, the number of synchronization attempts is considerably reduced, indicating that, when speculation is disabled, it remains disabled for a considerable period of time. This is due to our conservative algorithm, which ensures that speculation is only reenabled when its net estimated overhead is negligible.

Surprisingly, speculative execution improves application performance on a 48MB system without the benefit of the memory control mechanism. This is due to more accurate prefetching compared with the default readahead heuristic; the memory cost of speculative execution is more than offset by the reduction in needlessly prefetched data. However, even in this case, memory control still provides a further gain of nearly 10% by disabling speculative execution while it is less effective. In the 72MB and 80MB results, basic speculative execution has enough memory available to provide overall benefit; however, the control mechanism is still able to identify a handful of places where it is beneficial to temporarily disable speculative execution.


next up previous
Next: Comparison to previous design Up: Controlling memory overhead Previous: Reactive cost-benefit analysis