Task #4945
closedUse constant interest timeout for first Interest via Segment Fetcher
100%
Description
Tianxiang reported very frequent memory allocations when running PSync in ndnSIM traced to ndn-cxx SegmentFetcher. In sync if we set the sync interest lifetime to a particular value, PSync should send the sync interest on that schedule (sync interest lifetime / 2). (This is irrespective of frequent memory allocation problems). But due to the usage of SegmentFetcher, sync interest is sent more frequently (after 1 second, 2 second, and 4 second).
So we should add an option to SegmentFetcher to use constant interest timeout for first segment and turn it on in PSync.
Updated by Ashlesh Gawande about 5 years ago
- Description updated (diff)
- Target version set to v0.3.0
Updated by Ashlesh Gawande about 5 years ago
- Status changed from New to In Progress
Updated by Junxiao Shi about 5 years ago
add an option to SegmentFetcher to use constant interest timeout for first segment
Why can't PSync use constant timeout for all segments? What's special for the first segment?
Updated by Ashlesh Gawande about 5 years ago
Junxiao Shi wrote:
add an option to SegmentFetcher to use constant interest timeout for first segment
Why can't PSync use constant timeout for all segments? What's special for the first segment?
First segment (segment 0) is also the traditional sync interest so it is expected to stick to sync period rather than timeout early.
Updated by Davide Pesavento about 5 years ago
hmm maybe using SegmentFetcher for sync interests isn't appropriate? And there's another (minor) problem with this: the RTT/RTO logic in SegmentFetcher will likely overestimate the RTT, because the sync Interest may be satisfied a (relatively) long time after being sent, because there was nothing new before then. I think SegmentFetcher is mainly designed for fetching "static" content.
Updated by Ashlesh Gawande about 5 years ago
Data segmentation is required when there are large amount of differences or when no difference is recognized and we want to send everything we have. So I think we will use SegmentFetcher for now as it is available.
Updated by Davide Pesavento about 5 years ago
I didn't say anything about segmentation :) I'm just pointing out that SegmentFetcher doesn't completely fit the requirements of PSync. And I am mildly opposed to adding a hack to SegmentFetcher to cover another hack.
I suggested an alternative on gerrit (change the estimator's initial RTO).
Yet another idea is to not use SegmentFetcher for the first segment (I assume PSync already handles the periodic retx internally anyway), and only start a SegmentFetcher for subsequent segments after you learn that the data is segmented. The drawback is that the first segment will be fetched twice, the second interest will be satisfied by the local Content Store, but that means that for a few segments the RTT will be underestimated, which could cause more RTO timeouts than necessary.
Updated by Ashlesh Gawande about 5 years ago
Okay, thanks. I will change the initial RTO and look at other solutions if any problems with over-estimation show up in the future.
Updated by Ashlesh Gawande about 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Updated by Ashlesh Gawande almost 5 years ago
- Target version changed from v0.3.0 to v0.2.0
Updated by Ashlesh Gawande almost 5 years ago
- Tracker changed from Feature to Task