java.lang.Object
net.i2p.router.Tuner.BaseParam
net.i2p.router.Tuner.TunnelIVFilterMParam
All Implemented Interfaces:
Tuner.TunableParam
Enclosing class:
Tuner

private class Tuner.TunnelIVFilterMParamextends Tuner.BaseParam
Tunes the tunnel IV filter size.

The filter rejects repeated tunnel IVs, so an undersized filter shows up as legitimate tunnel data being dropped, which costs throughput and adds latency. The exponent is therefore driven by the entries actually seen in the last decay window, not by the configured share, and the share is never on its own a reason to shrink.

The ceiling is the largest exponent whose two buffers fit in the filter's share of the heap. See wip/decaying-filter-adaptive-sizing-20260928.md.

  • Constructor Details

    • TunnelIVFilterMParam

      TunnelIVFilterMParam()
      Creates the parameter that tunes the tunnel IV filter size as a bits exponent.
  • Method Details

    • sizer

      Gives the sizer this parameter drives.
      Returns:
      the IV filter sizer
    • applyValue

      protected void applyValue(int value)
      Description copied from class: Tuner.BaseParam
      Apply the tunable value to the router configuration.
      Specified by:
      applyValue in class Tuner.BaseParam
      Parameters:
      value - the tunable value to apply to router configuration
    • getRuntimeValue

      protected int getRuntimeValue()
      Description copied from class: Tuner.BaseParam
      Current runtime value read from the router configuration.
      Specified by:
      getRuntimeValue in class Tuner.BaseParam
      Returns:
      current runtime value read from router config
    • getObservedStat

      protected double getObservedStat(RouterContext ctx)
      Entries in the last completed decay window, from the filter itself.
      Specified by:
      getObservedStat in class Tuner.BaseParam
      Parameters:
      ctx - router context, never null
      Returns:
      observed stat value for autotuning
    • computeTarget

      protected int computeTarget(double observed)
      Observed is the number of entries in the last decay window. Cross-refs: the live false positive rate and the heap pressure the sizer reads for itself.
      Specified by:
      computeTarget in class Tuner.BaseParam
      Parameters:
      observed - current stat value
      Returns:
      target tunable value