ContentStore has a benchmark program similar to the FIB+PIT benchmark to be created in this issue.
It's recommended to follow the same structure, and place the program in NFD/tests/other
directory.
There are several different series of FIB and PIT operations used in forwarding.
We should start with the most common case: a consumer expresses an Interest that is neither aggregated nor satisfied by ContentStore; the Interest is forwarded to a producer, and brings back a Data.
This translates to the following series of operations:
- (incoming Interest pipeline) insert a new PIT entry, using Interest as argument
- (ContentStore miss pipeline) FIB longest prefix lookup, using PIT entry as argument, returning an entry with one nexthop
- (incoming Data pipeline) query PIT, using Data as argument, returning a PIT entry
- (Interest finalize pipeline) delete the PIT entry, using PIT entry as argument (no lookup)
It's important to capture the asynchronous nature of forwarding.
The operations above should not be executed within the same loop body.
Instead, step 1 and 2 are executed together, step 3 is executed gap3
loops later, and step 4 is executed gap4
loops later.
In other words, if step 1 and 2 are executed when i==1000
, step 3 should be executed when i==1000+gap3
, and step 4 should be executed when i==1000+gap3+gap4
.
The two parameters, gap3
and gap4
, determine the size of PIT.
The length of names, measured in number of components, is also significant, because they can affect the number of loops within the NameTree
longest prefix match procedure.
There are three parameters here: length of FIB prefixes, length of Interest names, and length of Data names.
In the series of operations above, these three parameters should be in an increasing order.
These and other necessary parameters can be left as compile-time constants in the code.
User of the benchmark program is expected to modify the code with desirable parameters.