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

private class Tuner.MaxInboundBufferParamextends Tuner.BaseParam
Per-connection inbound buffer cap (bytes). Raise when choke pressure is high (receiver can't keep up) or retransmissions are frequent (more in-flight capacity needed). Lower when memory pressure is high.
  • Constructor Details

    • MaxInboundBufferParam

      MaxInboundBufferParam()
      Creates the parameter that tunes the streaming inbound buffer cap in bytes.
  • Method Details

    • applyValue

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

      protected int getRuntimeValue()
      Read current cap from I2PSocketManagerFull.
      Specified by:
      getRuntimeValue in class Tuner.BaseParam
      Returns:
      current runtime value read from router config
    • getObservedStat

      protected double getObservedStat(RouterContext ctx)
      Observed stat: choke activations per 60s window.
      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)
      Compute target based on choke pressure, retransmissions, and memory pressure.
      Specified by:
      computeTarget in class Tuner.BaseParam
      Parameters:
      observed - current stat value
      Returns:
      target tunable value