Changeset 7073


Ignore:
Timestamp:
Nov 8, 2008, 3:39:48 PM (12 years ago)
Author:
charles
Message:

tweak the bandwidth manager code a little more to try & prevent oscillation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r7070 r7073  
    23382338    const double seconds_per_pulse = BANDWIDTH_PERIOD_MSEC / 1000.0;
    23392339    const double baseline_bytes_per_pulse = desired_average_kb_per_sec * 1024.0 * seconds_per_pulse;
    2340     const double min = baseline_bytes_per_pulse * 0.85;
    2341     const double max = baseline_bytes_per_pulse * 1.15;
     2340    const double min = baseline_bytes_per_pulse * 0.80;
     2341    const double max = baseline_bytes_per_pulse * 1.10;
    23422342    const double current_bytes_per_pulse = tr_rcRate( ratecontrol ) * 1024.0 * seconds_per_pulse;
    23432343    const double next_pulse_bytes = baseline_bytes_per_pulse * ( pulses_per_history + 1 )
     
    23502350    clamped = MIN( clamped, max );
    23512351
    2352 /*fprintf( stderr, "desiredAvgKB is %.2f, rate is %.2f, allocating %.2f (%.2f)\n",
     2352#if 0
     2353fprintf( stderr, "desiredAvgKB is %5.2f, rate is %5.2f, allocating %5.2f (%5.2f)\n",
    23532354         desired_average_kb_per_sec,
    23542355         tr_rcRate( ratecontrol ),
    23552356         clamped/1024.0,
    2356          next_pulse_bytes/1024.0 );*/
     2357         next_pulse_bytes/1024.0 );
     2358#endif
    23572359
    23582360    return clamped;
Note: See TracChangeset for help on using the changeset viewer.