<div dir="ltr"><div dir="ltr"><div>Dear folks</div><div><br></div></div>Congestion marking by the forwarders and congestion control algorithms in consumers go hand-in-hand in providing effective congestion control in NDN network. This scheme is designed in the paper: <a href="https://named-data.net/publications/practical_congestion_control_scheme/"><b>A Practical Congestion Control Scheme for Named Data Networking</b></a> (PCON).<div dir="ltr"><div><br></div><div>The most important part of the PCON paper is in Section 3.</div><div style="margin-left:40px">PCON consists of five components:</div><div style="margin-left:40px"><ol><li>Congestion Detection: Each node detects congestion locally by monitoring its outgoing queues.</li><li>Congestion Signaling: After detecting congestion, nodes mark Data packets to inform downstream routers and consumers.</li><li>Consumer Rate Adjustment: End consumers react to congestion signals by adjusting their Interest sending rate.</li><li>Multipath Forwarding: Downstream routers react to congestion signals by adjusting their traffic split ratio.</li><li>Local Link Loss Detection: On wireless and IP overlay links we locally detect packet loss and signal it back using NACKs.</li></ol></div><div><br></div><div>Forwarder's congestion marking feature is item 2 <b>congestion signaling</b> in the PCON framework. It informs consumers about an in-network congestion.</div></div><div>Notice that congestion marks are advisory: the consumer is expected to react to the congestion marks in consumer rate adjustment feature. If the consumer does not cooperate, congestion marks would be useless. PCON framework does not have an enforcement mechanism.<br></div><div><br></div><div>The congestion signaling feature depends on item 1 <b>congestion detection</b>. As intended by the PCON authors, this should be based on sojourn time, i.e. how long a packet remains in the queue. See <a href="https://tools.ietf.org/html/rfc8290">RFC8290</a> for background.<br></div><div>Both NFD and NDN-DPDK implemented congestion mark, and the difference is in how they perform congestion detection.</div><div>In NFD (as of v0.7.1), outgoing queues are in the kernel and NFD cannot measure the sojourn time directly, and congestion detection is based on send queue length as an approximation. The implementation is in 
<span class="gmail-pl-en"><a href="https://github.com/named-data/NFD/blob/9ab43e67dbcec8e5c9a1e28007a14d97655a8079/daemon/face/generic-link-service.cpp#L246">GenericLinkService::checkCongestionLevel</a> function.</span></div><div><span class="gmail-pl-en">In NDN-DPDK (as of 2020-June), congestion detection is based on sojourn time, but it's applied to incoming queues instead of outgoing queues, because the benchmarks indicate that the bottleneck occurs on the input side. See the <a href="https://dl.acm.org/doi/10.1145/3405656.3418715">NDN-DPDK paper</a> for explanation.<br></span>

</div><div dir="ltr"><div><br></div><div><br></div><div>
<div>Congestion control algorithms in consumers is item 3 <b>consumer rate adjustment</b> in the PCON framework.</div><div>As mentioned above, having consumers react to congestion marks is required for PCON to work. Without consumer reaction, the advisory-only congestion marks are useless.</div><div>ndn-cxx SegmentFetcher, ndncatchunks, NDNts @ndn/segmented-object package, and NDN-DPDK app/fetch package all implement the same algorithm: the basic congestion control algorithm is CUBIC (<a href="https://tools.ietf.org/html/rfc8312">RFC8312</a>), while receiving a congestion mark triggers a window decrease.</div><div>Additionally, ndncatchunks can be configured to use AIMD as the basic algorithm instead of CUBIC, but there isn't much value in doing so.<br></div>

</div><div><br></div><div>According to PCON authors, if the forwarders do not insert congestion marks, the consumer's congestion control algorithm (i.e. CUBIC) is still useful.</div><div>However, it would be less effective, because window decrease would not happen until after a timeout (i.e. packet loss), which typically occurs later than congestion marks which is a form of early signaling.</div><div><br></div><div><br></div><div>See also #<a href="https://redmine.named-data.net/issues/1624">1624</a> and its subtasks for discussions related to the congestion control implementation in NFD and ndncatchunks, some of which are still incomplete.<br></div><div><br></div><div>Yours, Junxiao<br></div></div><div><br></div><div><br></div><div>
<div dir="ltr">Notice: I generally do not answer technical questions regarding non-confidential projects in private, because I believe in an open development procedure in which everyone shall have access to all technical communications through mailing list archives and issue trackers, etc. The requester who posted the question below has granted permission for me to send the question and my reply to the mailing list. The requester did not post to the mailing list initially because they believed that the question was merely asking for links to existing information, but I still believe it is valuable for this answer to be recorded by the mailing list, because having this question implies that the desired information is not adequately accessible by searching existing resources, and my answer would become searchable once posted. Please reply-all to the mailing list to continue the open discussion.</div><div dir="ltr"><br></div>

</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 22, 2021 at 7:17 PM Lixia Zhang <<a href="mailto:lixia@cs.ucla.edu">lixia@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><p style="text-align:center"><font color="red"><b>External Email</b><br></font></p>Junxiao, Beichuan, and Alex<div><br></div><div>Sichen started playing with NDN congestion control (this is for Edmund's stuff), one of the first things he's trying to figure out is the interplay between congestion marking and catchunk congestion control -- how much is the difference between with, and without the marking.</div><div><br></div><div>I suggested Sichen to put together a slide deck that describes both. I recall a few years back when you people implementing the marking, there were some design slides. Wonder if any of you could sender the pointers (or even redmine discussions) to Sichen?</div><div><br></div><div>thanks, Lixia<br><div><br></div><br></div></div></blockquote></div></div>