Flow Monitor Question - min time?

71 views
Skip to first unread message

Ella Robinson

unread,
Oct 1, 2025, 3:18:08 PMOct 1
to ns-3-...@googlegroups.com
Is there a minimum time for flow monitor to operate?
When I run my simulation for 30 seconds, the lost packets in flow monitor are being displayed correctly as tx packets - rx packets.
However, when I run the simulation for 10 seconds, the lost packets are always 0, although I can see that packets are being lost.
Is there a minimum time for flow monitor to operate?
My network is not congested.

For 30 s:
Flow ID: 1 ; 10.1.1.2 ----> 10.1.1.1
  Tx Packets: 2849
  Rx Packets: 2849
  Lost Packets: 0
  Throughput: 94.9667 Kbps
Flow ID: 2 ; 10.1.1.3 ----> 10.1.1.1
  Tx Packets: 23749
  Rx Packets: 23736
  Lost Packets: 13

  Throughput: 791.2 Kbps
Flow ID: 3 ; 10.1.1.4 ----> 10.1.1.1
  Tx Packets: 23749
  Rx Packets: 23748
  Lost Packets: 0
  Throughput: 791.6 Kbps
Flow ID: 4 ; 10.1.1.5 ----> 10.1.1.1
  Tx Packets: 23749
  Rx Packets: 23741
  Lost Packets: 8

  Throughput: 791.367 Kbps

For 10 s:
Flow ID: 1 ; 10.1.1.2 ----> 10.1.1.1
  Tx Packets: 849
  Rx Packets: 849
  Lost Packets: 0
  Throughput: 84.9 Kbps
Flow ID: 2 ; 10.1.1.3 ----> 10.1.1.1
  Tx Packets: 7062
  Rx Packets: 7048
  Lost Packets: 0

  Throughput: 704.8 Kbps
Flow ID: 3 ; 10.1.1.4 ----> 10.1.1.1
  Tx Packets: 7062
  Rx Packets: 7062
  Lost Packets: 0
  Throughput: 706.2 Kbps
Flow ID: 4 ; 10.1.1.5 ----> 10.1.1.1
  Tx Packets: 7062
  Rx Packets: 7054
  Lost Packets: 0

  Throughput: 705.4 Kbps

Gabriel Ferreira

unread,
Oct 2, 2025, 7:41:43 AMOct 2
to ns-3-users
It is a fun thing that you said 10 seconds. Because that is precisely the default value for MaxPerHopDelay of FlowMonitor.
a.k.a. it considers these packets are still in flight (which may be correct).

Ella Robinson

unread,
Oct 2, 2025, 4:05:30 PMOct 2
to ns-3-users
Got it, thanks Gabriel!
I am observing another thing. For each flow, the first 3 packets are received fine, but then I experience a burst of drops. And then all is good for the rest of the simulation.
I have tried changing traffic models, tweaking with the start times of apps, but I am getting a consistent trend. 
First 3 packets get out and reach receiver fine, then a burst of consecutive packet drops, and all good for the remainder of the simulation.
It's a simple Wi-Fi network. 1 AP, 3 STAs. Uplink only. STAs using OnOff application to generate packets and sending to AP. AP has packet sinks installed.
Any clue as to why this could be happening?

Gabriel Ferreira

unread,
Oct 6, 2025, 8:54:30 AMOct 6
to ns-3-users
No idea. Look at the pcap.

Tommaso Pecorella

unread,
Oct 10, 2025, 4:11:55 PMOct 10
to ns-3-users
Your ARP queue is clogged.

Solution 1 (the most realistic): don't start all the flows at the same time (and give some time to ARP to populate the tables).
Solution 2 (mildly unrealistic): increase the ARP queue size, there's an Attribute.
Solution 3 (very unrealistic, idealized condition): disable ARP by pre-populating the ARP tables in the simulation (look at the Internet helper).

Ella

unread,
Oct 16, 2025, 2:21:57 PM (10 days ago) Oct 16
to ns-3-users
Thank you Tommaso for your reply. I actually tried all 3 solutions, but still was observing the same. 
Then I removed all other STAs, and have only 1 STA and 1 AP - just to check is the problem is related to Solution 1 (multiple flows). Still the same observation. 
I think it's got to do with my On-Off traffic parameters.
Because when I increase my packet size in the OnOff attribute, I get no drops. My packet is very small, its set to 100 bytes, I am using default data rate, and 802.11n.
But again these first few drops with 100 bytes packet size are being observed only after the first 3 successful consecutive packets reaching the AP. For the rest of the simulation, no additional drops.
I am thinking my packets might not be fully fitting in the first On time..
Is it true that the OnOff schedular "stabilizes" after the first On period? (and hence the reason why my rest of my simulation goes on fine)


Tommaso Pecorella

unread,
Oct 16, 2025, 7:27:13 PM (9 days ago) Oct 16
to ns-3-users
No idea, I'd need a test scrit to check.
Reply all
Reply to author
Forward
0 new messages