The sender repeatedly sends messages of a constant, configurable size on an established connection. The receiver repeatedly skips past N such messages, reads the desired message, and then reads the N
skipped messages. The receiver is implemented using a
non-seeking and a seeking approach. In the non-seeking
version, the N skipped messages are first copied from the
socket buffer into application memory. In the seeking version, all of the skipping is done using the new seek recv
system call. The performance of the system is evaluated using the sum of system and user time seen at the receiver system. The percentage of this active CPU time reduced by the
seeking version is the metric used to evaluate the effectiveness of seeking. Each test consists of 100 repetitions of the
following: opening a socket, transferring 1000 messages on
it according to the receive policy described above, and closing that socket. The system only has one active socket at a
time.
Figure 3 shows the active CPU time reduction achieved
using the seekable sockets interface. The different curves
represent N values ranging from 2 to 16, while the X-axis
of the graph represents the message size in bytes. Note that
the X axis is logarithmically scaled. The Y-axis represents
the percentage of CPU time reduced using seekable sockets: numbers below 0% indicate situations where the new
interface degraded performance. Each data point was tested
10 times; the curves show the average values with standard
error bars to show the experimental variation across tests;
these experimental errors decrease for larger message sizes
because the tests run for longer and are less subject to random OS and cache behavior.
Seeking sometimes degrades performance for low N values or small messages because of the greater overhead in
processing the socket buffers (e.g., managing the holes list).