Task #1623
closedMake ContentStore size configurable
100%
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.
Updated by Junxiao Shi over 10 years ago
- Related to Feature #1301: Shrink table size during memory stress added
Updated by Anonymous over 10 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.
Updated by Alex Afanasyev over 10 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.
Updated by Anonymous over 10 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)
Updated by Anonymous over 10 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 70
Updated by Anonymous over 10 years ago
- Blocked by Bug #1646: ~Cs assertion failure after setLimit() added
Updated by Anonymous over 10 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.
Updated by Alex Afanasyev over 10 years ago
- Status changed from Code review to Closed
Updated by Junxiao Shi over 10 years ago
- Status changed from Closed to Feedback
The wiki page ConfigFileFormat needs updated with the new tables
section.
Updated by Alex Afanasyev over 10 years ago
I just copied the current nfd.conf.sample to wiki. There were several differences, including very much redesigned rib section.
Updated by Junxiao Shi over 10 years ago
- Status changed from Feedback to Closed
Updated by Alex Afanasyev over 10 years ago
- Related to Task #1743: Proper default settings are not applied to ContentStore added