Hi there!

(Actual question at the end.)


I am testing the performance of a network "device under test", which
essentially is a network gateway but does some modifications to incoming
packets, so it uses some CPU depending on mode of operation.
It has two NICs, one goes to a load generator host and one to a separate
analyzer host.
The frame size of the generated frames is 64 Kbytes, i.e., the packets are
46 Kbytes including the IP header and the rest is ethernet overhead.
Transport protocol is UDP.

So far:

Results are as good as expected under the following conditions:
* When testing unidirectionally (regardless of frame size).
* When testing without the gateway (i.e., plain ethernet cable)
* When testing 10x larger frame sizes bidirectionally.
Reference for expectation of results is series of tests in the past using
specialized testing equipment.


The IFG (inter frame gap) between generated frames usually shows a rather
bursty than uniformly spaced frame stream despite the generator's explicit
efforts to have a uniform IFG.
Ultimately, I attribute this to the limits of PC hardware clock resolution
and of the level of determinism in interrupt handling (I know what
determinism is, but can I express this like that? I skimmed some papers
about realtime enhancements for normal systems but am far from being in
expert in that field).
At 64 Kbytes, bidirectional traffic through said gateway is not without
immense frame loss, almost 50% more than expected.

Basic idea for a solution:

Usage of realtime OS functionality. I hope to make use of the better
determinism regarding interrupts and such and the better clock resolution
(if I got that right...) in order to achieve a way more uniform IFG so that
the gateway can react much more smoothly to the incoming stream and will
not drop that many packets.


Is there an existing free realtime implementation/enhancement for Linux does
is fast enough on current top PC hardware to allow for bidirectional
generation of fast (at least 20-30 Mbps in each direction at the same time)
UDP streams at uniform IFG?
At best, it would be something which permits just using the existing Linux
processes with a realtime network stack (or some such) - I couldn't find
any. So far, all free solutions at least more or less require writing the
app for specifically using the installed realtime enhancement, if that is

Does anyone know wether one could write realtime apps / kernel modules for
RTnet/RKIA that would cause uniform gaps?
However, IIRC, RTnet or RKIA can run only one realtime process at the same
time, which in turn would is bad if the testing application forks at both
hosts to simultaneously generate and receive a UDP stream in the reverse
direction. But I guess, if I understand it correctly, I will have to
rewrite the testing app anew anyway to fit as a realtime app. If someone is
knowledgable in RTnet/RKIA: maybe there is a way a circumvent the
requirement of only one realtime process at a time? I think I am pretty
naive at this right now.

I know I will have to read up a lot more on realtime issues, but I am mainly
interested if it is even feasible and imaginable to achieve it with the
current free tools that are available today.
On the net, there are a lot of papers regarding performance of realtime
systems or testing accuracies, but nothing seems to address what I am
looking for.

Any pointers are very welcome indeed.