Per-Packet Delay Calculation in NS3 Trace files

455 views
Skip to first unread message

Mehdi N

unread,
Nov 8, 2016, 9:08:16 PM11/8/16
to ns-3-users
Hi all,

I am trying to calculate the queueing delay in NS3, and wondered why using the trace files give me inconsistent results from finding the queue length and dividing it by the channel rate. In other words, I assume the way NS3 finds delays to schedule the RX event is as follows:
            
                  P2P Channel
                    ----------------
Node 1 ----  Link Queue  | ---- Node 2
                    ----------------

Link Queue Length (i.e., number of packets in the Queue) at time t = L(t)
Channel Rate = 5 Mbps
Packet Size = 1000 Bytes
Channel Delay = 0 ms


Time between Transmit and Receive of a packet (sent at time t_1):

delta_t = L(t_1) * 1000 / 5000000

Therefore, the receive time (t_rx) should be found as follows:

t_rx = t_1 + delta_t


Now, when I find the number of packets in the queue (from the trace file Enqueue and Dequeue), and divide it by my channel rate, I get some value that is not consistent with the time that specific packet is received in the trace file. What am I doing wrong here?



Regards,
Mehdi

P.S.: For some reason, I do not want to use FlowMonitor or other packages. 


Nazmul Alam

unread,
Nov 11, 2016, 1:12:13 AM11/11/16
to ns-3-users
HI,
I believe in ns-3 p2p-channel has a delay properties, did you consider that value as propagation_delay?

regards,

Mehdi N

unread,
Nov 30, 2016, 2:42:51 PM11/30/16
to ns-3-users
Hi,

Yeah, I did consider that. The problem is with the queueing strategy of the NS3. 

Regards,
Mehdi
Reply all
Reply to author
Forward
0 new messages