Understanding network capacity and latency


Network latency analysis is meaningful only when operating below network capacity. When traffic generation exceeds capacity, queuing delays accumulate indefinitely, leading to unreliable latency measurements. Therefore, establishing the network's operational capacity is a first step in latency analysis.


Determining network capacity


The network's capacity threshold can be identified through incremental load testing:

  1. Begin with minimal traffic generation
  2. Gradually increase the traffic rate
  3. Monitor throughput response:
    • Below capacity: Throughput increases linearly with generation rate
    • At capacity: Throughput plateaus despite increased generation rate
  4. Conduct latency analysis within the linear throughput region


TDMA Example: Two nodes, one transmitting node, one application with constant packet arrivals, one-hop, round robin scheduling, static routing 


We start with the same simple example provided in https://tetcos.freshdesk.com/support/solutions/articles/14000154947 where we estimate throughput of a TDMA network analytically.  The analytically estimated capacity is 49.75 Kbps at the PHY or 43.64 kbps at the application layer. 


Packet size is a critical parameter in TDMA networks, where the packet size at the PHY layer should ideally match the slot capacity exactly. When a packet is larger than the slot capacity, it results in fragmentation, requiring the packet to be split across multiple slots. Conversely, if the packet is smaller than the slot capacity, the available bandwidth is not used optimally, leading to wasted capacity. In this example, with a slot capacity of 250B at the PHY layer, we select an application layer packet size of 222B. When combined with the 28B protocol overhead, this results in a PHY layer packet size of exactly 250B, achieving optimal slot utilization. 


The components of latency are

i.e., the total latency is the sum of queuing delay, transmission time, propagation delay and processing delay. In NetSim simulations, the processing delay is zero, simplifying our analysis to three components. For networks without packet fragmentation (large packet split across slots) or aggregation (multiple small packets aggregated in a slot) the transmission time is calculated as:


Transmission time:

With a packet size of 250B and a Phyrate of 100 Kbps(100000 bps), the predicted transmission time is


Propagation delay:


The propagation delay depends on the physical distance between nodes and is calculated as: 


where c is the speed of light, which in NetSim is taken to be 3.00x10^8 m/s and distance between nodes are 144.82 m. For our configuration

In this analysis, we consider a traffic generation rate of 40 Kbps to estimate the latency components. 


Transmission time+ Propagation delay


In NetSim we can calculate transmission time and propagation delay with packet trace using this below formula




Queuing delay:


The queuing delay calculation is generally complex. However, for deterministic traffic patterns where packets arrive at fixed intervals and the packet generation rate remains below the link capacity, the analysis simplifies considerably. In this case, queuing delay is the time interval between packet generation and slot acquisition. This can be expressed as the difference between the timestamp when the packet receives its designated transmission slot and when the packet was created. This straightforward calculation only holds when the packet generation rate is less than the link capacity. For non-deterministic arrivals or bursty traffic patterns, the queuing delay becomes stochastic and requires more complex queuing theory models for accurate estimation.


In NetSim we can calculate Queuing delay with packet trace using this below formula




Total latency

 
The table show the results of varying the generation rate to analyze its impact on throughput and latency. The total latency is the sum of queueing delay plus transmission time + propagation delay.



We next look at a plot of Total delay vs. Generation Rate.

The plot shows that Queuing delay (Purple) increases sharply as the generation rate approaches and exceeds the network's capacity (43 Kbps), while transmission time + propagation delay (red) remains constant.