No effect of MaxPerHopDelay attribute in Flow monitor

310 views
Skip to first unread message

Zoraze Ali

unread,
Feb 11, 2013, 7:53:03 PM2/11/13
to ns-3-...@googlegroups.com
Hi Everyone,

I am  simulating the LTE+EPC scenario with 10 Ues and i am using the Flow monitor to collect the stats and now i want to change one of the attribute MaxPerHopDelay of flow monitor by following way .

FlowMonitorHelper flowmon=FlowMonitorHelper();
flowmon.SetMonitorAttribute("MaxPerHopDelay",TimeValue (Seconds(0.01))); // i entered 0.01 value to see the Maximum change
 Ptr<FlowMonitor> monitor;
 monitor = flowmon.Install(ueNodes);
Simulator::Stop(Seconds(10.0 + startStagger * ueNodes.GetN () + 5.0));

Simulator::Run();
monitor->CheckForLostPackets ();
Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier> (flowmon.GetClassifier ());
  std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();
  std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i;
  for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i = stats.begin (); i != stats.end (); ++i)
    {
      Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (i->first);
          rx=rx+ (i->second.rxPackets);
          lost=lost+ (i->second.lostPackets);
          Delay_t=Delay_t + (i->second.delaySum.GetSeconds());
         
    }

As my MaxPerHopDelay value is 0.01 Seconds so practically most of the packets should be considered as lost packets but there is no change is stats at all.

I would be very thankful for your help/suggestions .

Regards,
Zoraze

Zoraze Ali

unread,
Feb 12, 2013, 9:36:10 AM2/12/13
to ns-3-...@googlegroups.com
And in the last i am generating the XML file by

monitor->SerializeToXmlFile ("LTE-12.xml", true, true);

regards,
zoraze

Konstantinos

unread,
Feb 12, 2013, 9:41:05 AM2/12/13
to ns-3-...@googlegroups.com
Hi Zoraze,

This "Delay" threshold is used only internally for FlowMonitor.

By reducing it you just increase the packets that will be accounted as lost by FlowMonitor.
However, if they are received within the packet time (TTL), they will also be accounted as Rx. 

What is the average delay that you see now and how many hops do the packets make? I don't have a clear idea on how this works (is it at the end or what...). One way is that FlowMonitor evaluates the "average" hop delay (it only knows the end-to-end delay of a flow) as follows : avg_per_hop_delay = e2e-delay / num_hops. and if this is above the threshold, then it is accounted as lost. But if for example the delay of 1st hop is 0.02sec and and the next 2 hops is 0.001, then avg_per_hop = 0.022/3 = 0.007 which is within the limits you set, even though for the first hop it exceeds.

Zoraze Ali

unread,
Feb 12, 2013, 10:17:33 AM2/12/13
to ns-3-...@googlegroups.com
Hello Konstantinos ,

Thanks alot for replying. Actually i have check that attribute by given the time 0 Seconds even and still there is no increase in the lost packets stats in xml file . Regarding the DelaySum in flowmonitor yes it contains the sum of all end-to-end delays for all received packets of the flow.

The reason i want to make this work is that i want all those packets considered as lost which arrives let suppose after 0.2 Seconds. I have also checked the function CheckForLostPackets (Time maxDelay) but that doesn't change any thing too in stats of xmll file.

Regards
Zoraze
Reply all
Reply to author
Forward
0 new messages