When moving from prototyping to a system integration phase, we
leave the desktop environment behind us and let our software run on a
real-time operating system. We provide another implementation for
the communication component that is capable of making use of zero copy
buffers that are available on the new platform. Both the ring buffer
used for gathering incoming datagrams and the buffers provided by the
user are just pointers to memory that is allocated by the operating
system and provided to the application. When recalculating the
properties of the component performance model,
this only has an effect on the
Me quantity. As depicted in figure 44 the data received
by the component are not passed through all processing layers, but only their
identifiers are forwarded. Therefore the Me
property becomes
. This difference can be seen when performing
measurements of data transfer. From the metric properties we expect a
growing performance difference between the ordinary implementation and
the zero copy approach with increasing data sizes. This originates in the
fact that the algorithmic overhead involves
data copy
operations. The longer the messages are, the more time will be spent
in a single data copy operation. Now these copies fall back to cheap
pointer passing operations.
The effect is indeed documented in the characteristic
figure of the component (see figure 45). The benchmark
consists of a roundtrip time
measurement, performed at the sender side. The left plot depicts
the increasing latency with growing data length, whereas the
right one shows the effective bandwidth. All measurements have
been carried out on PowerPC MV2304 platforms running the VxWorks
5.4 operating system. The network was a 100BASE-T Ethernet
connected to a dedicated 3COM switch. The glitches at packet lengths
equivalent to multiples of the Ethernet packet size stem from the
high overhead of handling an additional package that has only very little
payload.
The price that we have to pay for the increased flexibility obtained by
object-oriented components is small. It can be best seen when
performing low latency memory accesses with fine granularity. An
example is shown in figure 46. It outlines the time needed to
make a short data transfer from a memory module in a VME bus crate to
main memory of a PCI bus based microprocessor board in the same VME
crate. The set up is shown in the left part of the figure.
A DRAM module is plugged
into a VME bus crate. A microprocessor board (MVME2306) hosts a
PowerPC processor and a Universe VME/PCI bridge that performs DMA
data transfer from VME to the memory on the processor
board. The smallest possible amount of data that can be transferred in
the given configuration is 8 Bytes.
The highest efficiency can be achieved when
using the primitives provided by the VME-PCI bridge chip vendor
directly. Some price has to be paid when providing a DMA copy
operation as a C function call. Wrapping this call into an object
oriented stream component adds only a little additional overhead. In
total the difference between the bare interface to the chip and the
high level stream component is 1
sec. From the plot we can see
that the overhead is constant for all data sizes.