Self triggering is slow in OMNet++

Viewed 196

I am creating my own wired simulation model where nodes have layered architecture.

Application layer periodically generates packets then schedules itself using

scheduleAt(simTime() + 0.00000000625,AppModuleSelfTrigger);

This packet is then buffered in the next lower layer module. The lower layer module then periodically checks this buffer for packets. I'm achieving this by scheduling this layer module as well with

scheduleAt(simTime() + 0.00000000625,LowerLayerModuleSelfTrigger);

Similarly, every lower layers which uses buffers, I'm triggering them likewise to periodically trigger itself and check for any buffered packets to send.

This approach works fine. However, as I reduce the delay (0.00000000625) further then the GUI packet flow seams slow (e.g. After I see one packet flow event I have to wait very long period of time to see the next Packet flow in OMNeT++ GUI). But when I increase this delay value and rather use a higher decimal value, e.g. 0.2, then the GUI packet flows events seems to be fast (and I don't have to wait much to see the next packet in the GUI).

But the problem with setting this delay to higher values like 0.2 increases the packet latency (measured as simTime() - PacketCreationTime).

So, I am in doubt if I am using the whole process of self triggering correctly or I need to do some significant improvement.

1 Answers
Related