next up previous contents
Next: A.4 Microbenchmark for the Up: A. Benchmark Methodologies Previous: A.2 Microbenchmark for the   Contents

A.3 Microbenchmark for the $ g_{r}$ Parameter

Figure A.3: A saturated inflow pipe
\resizebox*{!}{2.5in}{\includegraphics{figures/appdx/bhmk_gr.eps}}

This microbenchmark measures the average inter-packet arrival time observed by a user-space process. If we can create and maintain a steady stream of packet inflow during the testing period, this measurement becomes a good approximation for the $ g_{r}$ parameter. For this microbenchmark, we simulate a saturated inflow pipe by directing a many-to-one data flow to the target node as shown in Figure A.3. After detecting that there are packet flooding in from the network, the target process arbitrary selects a time point and records the current time ($ t_{0} $) and arrival count ($ C_{0}) $. Then it waits for another arbitrary time period, say $ \delta $ unit, and records the current time ( $ t_{\delta } $) and arrival count ( $ C_{\delta } $) again. By dividing the the time gap $ (t_{\delta }-t_{0}) $ against the difference between $ C_{\delta } $ and $ C_{0} $, we obtain an approximation for the $ g_{r}$ parameter. We see that the accuracy of this methodology improves by (1) running this test multiple times to obtain the correct statistical distribution, and (2) using a relatively long time duration ($ \delta $) to alleviate the measuring mistake.

The remaining issue of this microbenchmark falls on how can we obtain the packet arrival count at the user-level. Here are some techniques that serves for our need:

  1. Directly get the received count from the network interface card (NIC). Most of the high-end NICs provide performance counters for diagnostic and statistical purpose.
  2. Monitor and report by the interrupt handler as it is responsible for handling incoming packets.
  3. The above two methods need to have support either from the hardware or from the kernel. Otherwise, we can indirectly probe and count the number of arrivals by the user process itself. The following pseudocode provides a sketch on how to achieve this.

    barrier ()

    wait $ \alpha *RTT $ time units

    repeat {

    msg $ \longleftarrow $ async_receive (*)

    } until (msg != NULL)

    $ t_{0} $ $ \longleftarrow $ clock ()

    i $ \longleftarrow $ 1

    $ t_{1} $ $ \longleftarrow $ clock ()

    while ( $ t_{0}+\delta >t_{1} $ ) {

    msg $ \longleftarrow $ async_receive (*)

    if (msg != NULL)

    inc i

    fi

    $ t_{1} $ $ \longleftarrow $ clock ()

    }


next up previous contents
Next: A.4 Microbenchmark for the Up: A. Benchmark Methodologies Previous: A.2 Microbenchmark for the   Contents