Table Of Contents
Table Of Contents

Measuring Queueing Time

Goals

In this example we explore the queueing time statistics of queue modules of network interfaces.

INET version: 4.4

The Model

The queueing time is measured from the moment a packet is enqueued up to the moment the same packet is dequeued from the queue. Simple packet queue modules are also often used to build more complicated queues such as a priority queue or even traffic shapers. The queueing time statistics are automatically collected for each of one these cases too.

Here is the network:

../../../../_images/Network6.png

Here is the configuration:

[General]
network = QueueingTimeMeasurementShowcase
description = "Measure queueing time in the switch"
sim-time-limit = 5s

# source application ~96Mbps throughput
*.source.numApps = 1
*.source.app[0].typename = "UdpSourceApp"
*.source.app[0].source.packetLength = 1200B
*.source.app[0].source.productionInterval = exponential(100us)
*.source.app[0].io.destAddress = "destination"
*.source.app[0].io.destPort = 1000

# destination application
*.destination.numApps = 1
*.destination.app[0].typename = "UdpSinkApp"
*.destination.app[0].io.localPort = 1000

Results

Here are the results:

../../../../_images/QueueingTimeHistogram.png
../../../../_images/QueueingTimeVector.png

Sources: omnetpp.ini, QueueingTimeMeasurementShowcase.ned

Try It Yourself

If you already have INET and OMNeT++ installed, start the IDE by typing omnetpp, import the INET project into the IDE, then navigate to the inet/showcases/measurement/queueingtime folder in the Project Explorer. There, you can view and edit the showcase files, run simulations, and analyze results.

Otherwise, there is an easy way to install INET and OMNeT++ using opp_env, and run the simulation interactively. Ensure that opp_env is installed on your system, then execute:

$ opp_env run inet-4.4 --init -w inet-workspace --install --chdir \
   -c 'cd inet-4.4.*/showcases/measurement/queueingtime && inet'

This command creates an inet-workspace directory, installs the appropriate versions of INET and OMNeT++ within it, and launches the inet command in the showcase directory for interactive simulation.

Alternatively, for a more hands-on experience, you can first set up the workspace and then open an interactive shell:

$ opp_env install --init -w inet-workspace inet-4.4
$ cd inet-workspace
$ opp_env shell

Inside the shell, start the IDE by typing omnetpp, import the INET project, then start exploring.

Discussion

Use this page in the GitHub issue tracker for commenting on this showcase.