Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #2470

Closed (moved)
(moved)
Open
Created Feb 01, 2011 by Roger Dingledine@arma

Relaybandwidthburst but no relaybandwidthrate = use too much bandwidth

If you set

RelayBandwidthBurst 2000 Kbytes

but don't set RelayBandwidthRate, you'll end up with a bandwidth line like LetoAms's:

bandwidth 5242880 2048000 5429489

It turns out we're ignoring RelayBandwidthBurst if you didn't also set RelayBandwidthRate. See this clause from connection_bucket_refill():

  if (options->RelayBandwidthRate) {
    relayrate = (int)options->RelayBandwidthRate;
    relayburst = (int)options->RelayBandwidthBurst;
  } else {
    relayrate = (int)options->BandwidthRate;
    relayburst = (int)options->BandwidthBurst;
  }

It's kind of an edge case, but we should still fix it. The fix should either be to fail to start if RelayBandwidthBurst is non-zero but RelayBandwidthRate is 0, or to set RelayBandwidthRate to RelayBandwidthBurst in that case and continue.

The latter choice is probably better. But notice that we do the former (complain and fail to start) if you set BandwidthBurst to 2MB but leave BandwidthRate alone (so it defaults to 5MB/s).

Reported by Paul Wouters.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking