https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232016-01-14T13:17:15ZNDN project issue tracking systemNFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=141682016-01-14T13:17:15ZHila Ben Abrahamhilata@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/504">nccPrediction.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/504/nccPrediction.jpg">nccPrediction.jpg</a> added</li></ul><p>Attached graph shows ncc prediction over time in the described scenario. As shown, the prediction doesn't go below the link RTT and therefore the strategy does not explore additional faces.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=141922016-01-15T13:36:46ZHila Ben Abrahamhilata@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/506">nccPrediction.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/506/nccPrediction.jpg">nccPrediction.jpg</a> added</li></ul><p>The updated graph shows ncc v1, which is a modified version of ncc. The only difference between the modified v1 and the existing one is that I cancel the scheduled call for timeoutOnBestFace if the interest is satisfied by the best face (inside beforeSatisfyInterest).</p>
<p>You can see that the prediction is now around the expected actual data response time (link RTT of 20ms + 8ms of App response time).</p>
<p>However, ncc still doesn't always explore additional faces due to the following sequence of events:</p>
<ol>
<li>Prediction is smaller than the link RTT ==> best face expires. timeoutOnBestFace is triggered and prediction is adjusted up.</li>
<li>Data is received on the best face. beforeSatisfyInterest is triggered and cancel the scheduled call of doPropagate.</li>
</ol>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=141932016-01-15T13:52:15ZJunxiao Shi
<ul><li><strong>Assignee</strong> set to <i>Hila Ben Abraham</i></li><li><strong>Target version</strong> set to <i>v0.5</i></li><li><strong>Estimated time</strong> set to <i>3.00 h</i></li></ul><p>I compared <code>NccStrategy</code> with ccnd 0.7.2 and agree this is a bug.</p>
<ul>
<li>ccnd 0.7.2 cancels the timer in <code>finalize_interest</code>, which is called when a PIT entry is erased, which in turn happens as soon as the Interest is satisfied.</li>
<li>In NFD, when the best face answers, the Interest table entry is retained and is scheduled to be erased after "straggler timer". This breaks the assumption of <code>NccStrategy</code>.</li>
</ul>
<p>I agree with the proposed solution in note-2.<br><br>
Hila, can you upload a Change along with a test case?</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=141942016-01-15T14:02:02ZJunxiao Shi
<ul></ul><blockquote>
<p>However, ncc still doesn't always explore additional faces due to the following sequence of events:</p>
<ol>
<li>Prediction is smaller than the link RTT ==> best face expires. timeoutOnBestFace is triggered and prediction is adjusted up.</li>
<li>Data is received on the best face. beforeSatisfyInterest is triggered and cancel the scheduled call of doPropagate.</li>
</ol>
</blockquote>
<p>This is a weakness in ccnd's design.<br><br>
Under ccnd strategy, a new nexthop can become default only if (RTT of new nexthop + current 'prediction' < RTT of current nexthop).<br>
Since 'prediction' is only slightly lower than RTT of current nexthop ( 1/2<sup>7</sup> ), this condition is unlikely to be met.<br><br>
An experiment with ccnd 0.7.2 exhibits a similar behavior: strategy is stuck with slower path even if a faster path has recovered.</p>
<p>Since NccStrategy is designed to match ccnd 0.7.2 behavior, this part should not be changed.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=142002016-01-16T09:04:41ZHila Ben Abrahamhilata@gmail.com
<ul></ul><blockquote>
<p>Hila, can you upload a Change along with a test case?</p>
</blockquote>
<p>yes.</p>
<blockquote>
<p>Since NccStrategy is designed to match ccnd 0.7.2 behavior, this part should not be changed.</p>
</blockquote>
<p>Is there a plan to improve ncc as a new nfd strategy?</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=142012016-01-16T09:56:53ZJunxiao Shi
<ul></ul><blockquote>
<p>Is there a plan to improve ncc as a new nfd strategy?</p>
</blockquote>
<p>No. There isn't sufficient understanding of ccnd strategy's use case, design rationale, and behavior.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=142402016-01-20T12:59:55ZHila Ben Abrahamhilata@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=142412016-01-20T13:13:59ZHila Ben Abrahamhilata@gmail.com
<ul></ul><p>Should the test case check the correctness of 'prediction' after data received on time? or should it just validate the timeout cancellation? (or maybe both?) Are there any special instructions/resources regarding the development of a new test case?</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=143812016-02-07T07:30:16ZJunxiao Shi
<ul></ul><p>Answer to note-8:</p>
<p>No, don't test the <em>minute detail</em> in the strategy, such as the exact timeout values.<br><br>
Instead, test the <em>trend</em>, such as whether it's increasing/decreasing when expected.</p>
<p>See <a class="wiki-page" href="https://redmine.named-data.net/projects/nfd/wiki/UnitTesting">UnitTesting</a> page on test suite guidelines.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=148812016-03-07T23:40:51ZAlex Afanasyev
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Code review</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul> NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=149642016-03-10T05:40:29ZJunxiao Shi
<ul></ul><p>I've written a test case <code>Fw/TestNccStrategy/PredictionAdjustment</code> in <a href="http://gerrit.named-data.net/2736">http://gerrit.named-data.net/2736</a> patchset7.<br><br>
Without Hila's changes in <code>NccStrategy</code>, the prediction would increase all the way to the maximum.<br>
With the changes in <code>NccStrategy</code>, the prediction is able to converge near path RTT.<br><br>
Thus, I believe the fix is correct.</p>
<p>The same test case also checks whether the new best face would be selected.<br>
This is expected to fail due to the weakness described in note-4.<br><br>
I'm using a <code>BOOST_WARN</code> to generate a warning only.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=149812016-03-10T15:09:38ZAlex Afanasyev
<ul></ul><p>Make it expected failure. Otherwise, there is no point of doing the check.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=150052016-03-11T10:44:01ZHila Ben Abrahamhilata@gmail.com
<ul></ul><p>I agree that patchset 7 includes a more comprehensive test scenario for ncc than the previous patchsets (that were mainly focused on this bug fix).</p>
<blockquote>
<p>The same test case also checks whether the new best face would be selected.<br>
This is expected to fail due to the weakness described in note-4.<br><br>
I'm using a <code>BOOST_WARN</code> to generate a warning only.</p>
</blockquote>
<p>I think that this test case should not be included in the test scenario. While the original ncc design does have the described weakness, my recent research efforts show that the current implementation of ncc in NDN actually requires that current 'prediction' + RTT of new next hop/2 (one way) < RTT of current next hop/2 to switch to the better performing face. This difference is caused by to the NACK generated on node D. I can elaborate more on that if needed, but I just want to point it out here due to the explanation of the expected failure in note-4 and on gerrit.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=150092016-03-11T19:29:30ZJunxiao Shi
<ul></ul><p>I disagree with note-13.</p>
<p>The second part of my test case shows the desired behavior as described in the Description field on this issue, but it's unavailable due to a weakness in ccnd design, and therefore should be marked as an expected failure.</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=150552016-03-14T09:59:26ZHila Ben Abrahamhilata@gmail.com
<ul></ul><p>I am not saying there is no weakness in the ccnd design, but I don't think note-4 (cited in patchset 7) captures the entire picture. In the current implementation of NDN the ncc strategy won't explore potential upstreams even if RTT of new nexthop + current 'prediction' > RTT of current nexthop. So this is more than just design weakness.</p>
<p>Anyway, if you still want to keep it I agree with note-12. </p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=150792016-03-15T10:04:13ZJunxiao Shi
<ul></ul><p>The PredictionAdjustment test case in patchset7 indicates that "switching to new best face" did not occur under the delay values set forth in the test case, due a weakness in <a class="wiki-page" href="https://redmine.named-data.net/projects/nfd/wiki/CcndStrategy">CcndStrategy</a> design.<br><br>
This does not reflect the whole picture (last paragraph of note-13), but it's a fact of the design, so I intend to keep this part of the test case.<br><br>
Can you update it according to note-12?</p>
NFD - Bug #3411: NccStrategy doesn't explore potential upstreamshttps://redmine.named-data.net/issues/3411?journal_id=153072016-03-31T13:03:24ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul>