Project

General

Profile

Task #1623

Make ContentStore size configurable

Added by Junxiao Shi over 5 years ago. Updated about 5 years ago.

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

100%

Estimated time:
3.00 h

Description

Design a "tables" configuration section.

It should contains an option to configure the size of ContentStore.

In the future, this section can contain other parameters of tables.

Modify class Cs so that the default constructor starts with a small limit.

When configuration is processed, Cs::setLimit is invoked to update the limit.


Related issues

Related to NFD - Feature #1301: Shrink table size during memory stressNew

Related to NFD - Task #1743: Proper default settings are not applied to ContentStoreClosed2014-07-07

Blocked by NFD - Bug #1646: ~Cs assertion failure after setLimit()Closed2014-06-03

History

#1 Updated by Junxiao Shi over 5 years ago

  • Related to Feature #1301: Shrink table size during memory stress added

#2 Updated by Anonymous over 5 years ago

Should the size be configured by the maximum number of packets or by storage size (e.g. 500MB)? I'm leaning towards storage size and letting the config processor deal with the conversion (we currently assume 8KB packets).

This would result in the section looking like so:

tables
{
  cs_max_size 500MB
}

We could support KB, MB, GB, and TB units for now. It would also be mandatory to specify the unity in order to future proof the config a bit.

#3 Updated by Alex Afanasyev over 5 years ago

Ideally, the size if of course better. The problem is that it is harder to maintain that size in the content store itself, since it depends on the size of data packets, which can vary greatly.

We only have this limit in number of packets, so for now it is enough to configure the limit in number of items.

#4 Updated by Anonymous over 5 years ago

Ok, I'll do something like this then:

tables
{
  ; ~500MB with average packet size = 8KB
  cs_max_packets 65536
}

(taken directly from cs.hpp)

#5 Updated by Anonymous over 5 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 70

#6 Updated by Anonymous over 5 years ago

  • Blocked by Bug #1646: ~Cs assertion failure after setLimit() added

#7 Updated by Anonymous over 5 years ago

  • Status changed from Feedback to Code review
  • % Done changed from 70 to 100

I've added #1646 as a blocker in the sense that it will prevent the tests from verifying. Otherwise, coding (modulo review comments) should be complete.

#8 Updated by Alex Afanasyev over 5 years ago

  • Status changed from Code review to Closed

#9 Updated by Junxiao Shi about 5 years ago

  • Status changed from Closed to Feedback

The wiki page ConfigFileFormat needs updated with the new tables section.

#10 Updated by Alex Afanasyev about 5 years ago

I just copied the current nfd.conf.sample to wiki. There were several differences, including very much redesigned rib section.

#11 Updated by Junxiao Shi about 5 years ago

  • Status changed from Feedback to Closed

#12 Updated by Alex Afanasyev about 5 years ago

  • Related to Task #1743: Proper default settings are not applied to ContentStore added

Also available in: Atom PDF