[ndnSIM] How to trace the latency of request, duration from sending the Interest to receiving corresponding Data
Alex Afanasyev
alexander.afanasyev at ucla.edu
Sat Jan 19 14:37:31 PST 2013
Hi Xiaoke,
I have revised my implementation of delay calculation. Now it should be more consistent.
In case that would be helpful, I also have added number of Interest retransmissions for FullDelay parameter.
In addition to that, I've did a little bit of implementation regarding your request for Interest/Data forwarding hop counting. I've added this parameter to the same trace helper.
There are a couple tricks for new HopCount field:
- HopCount is increased anytime somebody calls Send method on a face, including delivery of Interest/Data to application via an AppFace (but not from application to ndn::L3Protocol!).
- Interests satisfied by an app will have even hop count (min hop count = 2)
- Interests satisfied from caches will have off hop count (min hop count = 1)
---
Alex
On Jan 19, 2013, at 5:21 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
> Hi Alex,
> I tried many case today and I think there is a logic problem during retransmission.
>
> for example:
> 1. nodeN send seqQ,
> 2. seqQ timeout and then m_seqTimeouts(seqQ) is erased and seqQ is add to m_retxSeqs container
> 3. m_retxSeqs is waiting …
> 4. during the waiting, Data for seqQ comes, and it removes m_retxSeqs(seqQ), which cancel retransimssion
>
> In the above scenario, for latency trace will only have FullDelay but without LastDelay and some other logic problem (if you check more logs).
>
> solution is to modify code in ndn-consumer.cc:OnContentObject, add a "return statement" if no entry in m_seqTimeouts when content object comes
>
>
> SeqTimeoutsContainer::iterator entry = m_seqTimeouts.find (seq);
> if (entry != m_seqTimeouts.end ())
> {
> m_lastRetransmittedInterestDataDelay (this, seq, Simulator::Now () - entry->time);
> } else{
> NS_LOG_DEBUG("error:seq "<<seq<<" node: "<<GetNode()->GetId());
> return;
> }
>
>
> thanks
>
> My Regards,
> Xiaoke Jiang (蒋小可)
>
> Ph.D Candidate,
> Dept. of Computer Science and Technology,
> Tsinghua University, P. R. China
>
> On Jan 19, 2013, at 11:55 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>
>> Hmm.. Should work now with the latest commit I pushed. At least it is working in my trivial example.
>>
>> There was a silly typo in tracing helper.
>>
>> --
>> Alex
>>
>> On Jan 18, 2013, at 6:59 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>
>>> Hi Alex,
>>> Bad Signal. I tried the run with drop packets scenario, but the LastDelay always equals to FullDelay. I am trying to explore the reason.
>>>
>>> thanks
>>>
>>> My Regards,
>>> Xiaoke Jiang (蒋小可)
>>>
>>> Ph.D Candidate,
>>> Dept. of Computer Science and Technology,
>>> Tsinghua University, P. R. China
>>>
>>> On Jan 19, 2013, at 10:40 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>
>>>> Yes. I should have explained that in docs. If you don't mind I'll put your description there.
>>>>
>>>> ---
>>>> Alex
>>>>
>>>> On Jan 18, 2013, at 6:30 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>
>>>>> Hi Alex,
>>>>> I am checking the schema of trace file.
>>>>> Node: node id, global unique
>>>>> AppId: app id, local unique on the node, not global
>>>>> SeqNo: seq number of the interest-Data
>>>>> Type: LastDelay means last Interest-Data delay, FullDelay means request delay (including retransimission)
>>>>> DelayS: delay by seconds
>>>>> DelayUS: delay bey seconds x 10^-6 (microsecond)
>>>>>
>>>>>
>>>>> Am I right?
>>>>>
>>>>> thanks
>>>>>
>>>>> My Regards,
>>>>> Xiaoke Jiang (蒋小可)
>>>>>
>>>>> Ph.D Candidate,
>>>>> Dept. of Computer Science and Technology,
>>>>> Tsinghua University, P. R. China
>>>>>
>>>>> On Jan 19, 2013, at 10:06 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>>>
>>>>>> Thanks for pointing this out.
>>>>>>
>>>>>> Somehow I had a wrong rule in .gitignore and didn't notice that topology file never got committed till now. Should be there now.
>>>>>>
>>>>>> ---
>>>>>> Alex
>>>>>>
>>>>>> On Jan 18, 2013, at 5:59 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>>>
>>>>>>> Hi Alex,
>>>>>>> I can't find ""src/ndnSIM/examples/topologies/topo-tree.txt"", In fact there is no topologies directory on the GitHub.
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>> My Regards,
>>>>>>> Xiaoke Jiang (蒋小可)
>>>>>>>
>>>>>>> Ph.D Candidate,
>>>>>>> Dept. of Computer Science and Technology,
>>>>>>> Tsinghua University, P. R. China
>>>>>>>
>>>>>>> On Jan 19, 2013, at 8:45 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>>>>>
>>>>>>>> Hi Xiaoke,
>>>>>>>>
>>>>>>>> I have implemented a basic latency measurements in ndn::Consumer app (should work in all derivative-classes as well) and a simple tracing helper.
>>>>>>>> You give it a try and tell me if something is wrong or strange.
>>>>>>>>
>>>>>>>> You can check out basic doc here: http://ndnsim.net/metric.html#application-level-trace-helper
>>>>>>>>
>>>>>>>> ---
>>>>>>>> Alex
>>>>>>>>
>>>>>>>> On Jan 17, 2013, at 12:35 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thank you Alex.
>>>>>>>>> I think Interest-Data latency also works for me. But request latency (including retransmission delays) is better than Interest-Data latency. So I will try with I-D latency first and wait for you update.
>>>>>>>>>
>>>>>>>>> P.S, if the Interest don't get it's data or get an Nack, how do you define its latency in the program?
>>>>>>>>>
>>>>>>>>> thanks
>>>>>>>>>
>>>>>>>>> My Regards,
>>>>>>>>> Xiaoke Jiang (蒋小可)
>>>>>>>>>
>>>>>>>>> Ph.D Candidate,
>>>>>>>>> Dept. of Computer Science and Technology,
>>>>>>>>> Tsinghua University, P. R. China
>>>>>>>>>
>>>>>>>>> On Jan 17, 2013, at 4:13 AM, Alexander Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Xiaoke,
>>>>>>>>>>
>>>>>>>>>> It is up to the particular application to track down Interest-Data latency. There is another question regarding in which latency you're interested: just Interest-Data or first Interest for sequence number and reception of Data (which includes all the retransmission delays).
>>>>>>>>>>
>>>>>>>>>> Currently in ndn::Consumer-based apps, there is tracking of just Interest-Data packets (i.e., without retransmission delays) within RTT estimator variable (Ptr<RttEstimator> m_rtt) and in timeout container (SeqTimeoutsContainer m_seqTimeouts).
>>>>>>>>>>
>>>>>>>>>> If you want/need the other delay, including all retransmission timeouts, then it should be straightforward to implement, for example, using SeqTimeoutsContainer structure (similarly how m_seqLifetimes in ndn::Consumer).
>>>>>>>>>>
>>>>>>>>>> I think, and would do it when I can get time for that, it is a good idea to export both delay parameters as a trace sources in ndn::Consumer class, as well as write a simple metric helper.
>>>>>>>>>>
>>>>>>>>>> ---
>>>>>>>>>> Alex
>>>>>>>>>>
>>>>>>>>>> On Jan 16, 2013, at 5:36 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi All,
>>>>>>>>>>> How to trace the latency of request, duration from sending the Interest to receiving corresponding Data.
>>>>>>>>>>>
>>>>>>>>>>> Is there anyone can give some hint? Thank you in advance.
>>>>>>>>>>>
>>>>>>>>>>> thanks
>>>>>>>>>>>
>>>>>>>>>>> My Regards,
>>>>>>>>>>> Xiaoke Jiang (蒋小可)
>>>>>>>>>>>
>>>>>>>>>>> Ph.D Candidate,
>>>>>>>>>>> Dept. of Computer Science and Technology,
>>>>>>>>>>> Tsinghua University, P. R. China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130119/a6061b89/attachment.html>
More information about the ndnSIM
mailing list