Project

General

Profile

Actions

Task #4945

closed

Use constant interest timeout for first Interest via Segment Fetcher

Added by Ashlesh Gawande almost 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by Ashlesh Gawande over 4 years ago

  • Description updated (diff)
  • Target version set to v0.3.0
Actions #2

Updated by Ashlesh Gawande over 4 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Junxiao Shi over 4 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?

Actions #4

Updated by Ashlesh Gawande over 4 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.

Actions #5

Updated by Davide Pesavento over 4 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.

Actions #6

Updated by Ashlesh Gawande over 4 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.

Actions #7

Updated by Davide Pesavento over 4 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.

Actions #8

Updated by Ashlesh Gawande over 4 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.

Actions #9

Updated by Ashlesh Gawande over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
Actions #10

Updated by Ashlesh Gawande over 4 years ago

  • Target version changed from v0.3.0 to v0.2.0
Actions #11

Updated by Ashlesh Gawande about 4 years ago

  • Tracker changed from Feature to Task
Actions

Also available in: Atom PDF