<?xml version="1.0" encoding="us-ascii"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.9 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2544 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2544.xml">
<!ENTITY RFC8174 SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>

<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>

<rfc ipr="trust200902" docName="draft-vpolak-plrsearch-00" category="info">

  <front>
    <title>Probabilistic Loss Ratio Search for Packet Throughput (PLRsearch)</title>

    <author initials="M." surname="Konstantynowicz" fullname="Maciek Konstantynowicz" role="editor">
      <organization>Cisco Systems</organization>
      <address>
        <email>mkonstan@cisco.com</email>
      </address>
    </author>
    <author initials="V." surname="Polak" fullname="Vratko Polak" role="editor">
      <organization>Cisco Systems</organization>
      <address>
        <email>vrpolak@cisco.com</email>
      </address>
    </author>

    <date year="2018" month="October" day="22"/>

    <area>ops</area>
    <workgroup>Benchmarking Working Group</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document addresses challenges while applying methodologies
described in <xref target="RFC2544"></xref> to benchmarking NFV (Network Function
Virtualization) over an extended period of time, sometimes referred to
as "soak testing". More specifically to benchmarking software based
implementations of NFV data planes. Packet throughput search approach
proposed by this document assumes that system under test is
probabilistic in nature, and not deterministic.</t>



    </abstract>


  </front>

  <middle>


<section anchor="motivation" title="Motivation">

<t>Network providers are interested in throughput a device can sustain.</t>

<t>RFC 2544 assumes loss ratio is given by a deterministic function of
offered load. But NFV software devices are not deterministic (enough).
This leads for deterministic algorithms (such as MLRsearch with single
trial) to return results, which when repeated show relatively high
standard deviation, thus making it harder to tell what "the throughput"
actually is.</t>

<t>We need another algorithm, which takes this indeterminism into account.</t>

</section>
<section anchor="model" title="Model">

<t>Each algorithm searches for an answer to a precisely formulated
question. When the question involves indeterministic systems, it has to
specify probabilities (or prior distributions) which are tied to a
specific probabilistic model. Different models will have different
number (and meaning) of parameters. Complicated (but more realistic)
models have many parameters, and the math involved can be very
complicated. It is better to start with simpler probabilistic model, and
only change it when the output of the simpler algorithm is not stable or
useful enough.</t>

<t>TODO: Refer to packet forwarding terminology, such as "offered load" and
"loss ratio".</t>

<t>TODO: Mention that no packet duplication is expected (or is filtered
out).</t>

<t>TODO: Define critical load and critical region earlier.</t>

<t>This document is focused on algorithms related to packet loss count
only. No latency (or other information) is taken into account. For
simplicity, only one type of measurement is considered: dynamically
computed offered load, constant within trial measurement of
predetermined trial duration.</t>

<t>Also, running longer trials (in some situations) could be more efficient,
but in order to perform trial at multiple offered loads withing critical region,
trial durations should be kept as short as possible.</t>

</section>
<section anchor="poisson-distribution" title="Poisson Distribution">

<t>TODO: Give link to more officially published literature about Poisson
distribution.</t>

<t>Note-1: that the algorithm makes an assumption that packet traffic
generator detects duplicate packets on receive detection, and reports
this as an error.</t>

<t>Note-2: Binomial distribution is a better fit compared to Poisson
distribution (acknowledging that the number of packets lost cannot be
higher than the number of packets offered), but the difference tends to
be relevant in loads far above the critical region, so using Poisson
distribution helps the algorithm focus on critical region better.</t>

<t>When comparing different offered loads, the average loss per second is
assumed to increase, but the (deterministic) function from offered load
into average loss rate is otherwise unknown.</t>

<t>Given a loss target (configurable, by default one packet lost per
second), there is an unknown offered load when the average is exactly
that. We call that the "critical load". If critical load seems higher
than maximum offerable load, we should use the maximum offerable load to
make search output more stable.</t>

<t>Of course, there are great many increasing functions. The offered load
has to be chosen for each trial, and the computed posterior distribution
of critical load can change with each trial result.</t>

<t>To make the space of possible functions more tractable, some other
simplifying assumption is needed. As the algorithm will be examining
(also) loads close to the critical load, linear approximation to the
function (TODO: name the function) in the critical region is important.
But as the search algorithm needs to evaluate the function also far
away from the critical region, the approximate function has to be well-
behaved for every positive offered load, specifically it cannot predict
non-positive packet loss rate.</t>

<t>Within this document, "fitting function" is the name for such well-behaved
function which approximates the unknown function in the critical region.</t>

<t>Results from trials far from the critical region are likely to affect
the critical rate estimate negatively, as the fitting function does not
need to be a good approximation there. Instead of discarding some
results, or "suppressing" their impact with ad-hoc methods (other than
using Poisson distribution instead of binomial) is not used, as such
methods tend to make the overall search unstable. We rely on most of
measurements being done (eventually) within the critical region, and
overweighting far-off measurements (eventually) for well-behaved fitting
functions.</t>

</section>
<section anchor="fitting-function-coefficients-distribution" title="Fitting Function Coefficients Distribution">

<t>To accomodate systems with different behaviours, the fitting function is
expected to have few numeric parameters affecting its shape (mainly
affecting the linear approximation in the critical region).</t>

<t>The general search algorithm can use whatever increasing fitting
function, some specific functions can be described later.</t>

<t>TODO: Describe sigmoid-based and erf-based functions.</t>

<t>It is up to implementer to chose a fitting function and prior
distribution of its parameters. The rest of this document assumes each
parameter is independently and uniformly distributed over common
interval. Implementers are to add non-linear transformations into their
fitting functions if their prior is different.</t>

<t>TODO: Move the following sentence into more appropriate place.</t>

<t>Speaking about new trials, each next trial will be done at offered load
equal to the current average of the critical load.</t>

<t>Exit condition is either critical load stdev becoming small enough, or
overal search time becoming long enough.</t>

<t>The algorithm should report both avg and stdev for critical load. If the
reported averages follow a trend (without reaching equilibrium), avg and
stdev should refer to the equilibrium estibated based on the trend, not
to immediate posterior values.</t>

<t>TODO: Explicitly mention the iterative character of the search.</t>

</section>
<section anchor="algorithm-formulas" title="Algorithm Formulas">

<section anchor="integration" title="Integration">

<t>The posterior distributions for fitting function parameters will not be
integrable in general.</t>

<t>The search algorithm utilises the fact that trial measurement takes some
time, so this time can be used for numeric integration (using suitable
method, such as Monte Carlo) to achieve sufficient precision.</t>

</section>
<section anchor="optimizations" title="Optimizations">

<t>After enough trials, the posterior distribution will be concentrated in
a narrow area of parameter space. The integration method could take
advantage of that.</t>

<t>Even in the concentrated area, the likelihood can be quite small, so the
integration algorithm should track the logarithm of the likelihood, and
also avoid underflow errors bu ther means.</t>

</section>
</section>
<section anchor="known-implementations" title="Known Implementations">

<t>The only known working implementatin of Probabilistic Loss Ratio Search
for Packet Throughput is in Linux Foundation FD.io CSIT project. https://wiki.fd.io/view/CSIT. https://git.fd.io/csit/.</t>

<section anchor="fdio-csit-implementation-specifics" title="FD.io CSIT Implementation Specifics">

<t>In a sample implemenation in FD.io CSIT project, there is around 0.5
second delay between trials due to restrictons imposed by packet traffic
generator in use (T-Rex), avoiding that delay is out of scope of this
document.</t>

<t>TODO: Describe how the current integration algorithm finds the
concentrated area.</t>

</section>
</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>..</t>

</section>
<section anchor="security-considerations" title="Security Considerations">

<t>..</t>

</section>
<section anchor="acknowledgements" title="Acknowledgements">

<t>..</t>

</section>


  </middle>

  <back>

    <references title='Normative References'>

&RFC2544;
&RFC8174;


    </references>




  </back>

<!-- ##markdown-source:
H4sIAMNNz1sAA51Zy44bNxbd8yuIzkYNSHLHyGAyvRrHj8BI/IBtOIvBLKgq
SuJ0VVEhWZKVr59zLlkPqdsYYLyxWsUi7+Pcc8+lVquVSi419l5/DH5jNq5x
MblK/+5j1J9Mcl5/tiZUe731QX801YNN+ss++H63P/RJLz7+/inKglv1gzab
TbBH7DV8qWpfdabF9nUw27Q6HnxjHlaHJuTnq7s7VZuE58/vfvx59ePd6vlz
pdwh3OsU+pie39394+65MsGae+0PUZ129/oX21X71oQH1+30Hz7//ytMOqiH
071+2yUbOptWr3ikqky6167beqUqX2Ppve7jysTKOXVw9xr/ftCV6fCt1SYE
c9YLt9WmafTZxlsNt/cm7vXeBgsX9UonX+UP0YcU7DaWv86t/KG54J4v4+Ow
5F6Oqe3W9E2KWDE8zy/l5cr0ae/DvdLyb1X+1zAfK96t9W++i8l06dz5k6v+
Gp/nEL8zlbMP313kA1x/6WKFlJ5jsm0cHwVPBNjaJR/GL21rXHOv24e83z8r
vrqufPu0eV/X+iOTe2XU12DSg7969H+acgwCn5klqvOhBUqPlkH79Obl87/9
9FP5+POPf8dHxdSPa9RqtQJKY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