Loading changes/bug1789 +4 −4 Original line number Diff line number Diff line o Minor features: - Be more generous with how much bandwidth we'd use up (with accounting enabled) before entering "soft hibernation". Previously, we'd hibernate once we'd used up 95% of our allotment. Now, we use up 95% of our allotment, AND make sure that we have no more than 500MB/3 hours of traffic remaining before we enter soft hibernation. Previously, we'd hibernate once we'd used up 95% of our allotment. Now, we use up 95% of our allotment, AND make sure that we have no more than 500MB (or 3 hours of expected traffic, whichever is lower) remaining before we enter soft hibernation. o Minor bugfixes: - For bandwidth accounting, calculate our expected bandwidth rate Loading src/or/hibernate.c +6 −3 Original line number Diff line number Diff line Loading @@ -382,7 +382,10 @@ static void update_expected_bandwidth(void) { uint64_t expected; uint64_t max_configured = (get_options()->BandwidthRate * 60); or_options_t *options= get_options(); uint64_t max_configured = (options->RelayBandwidthRate > 0 ? options->RelayBandwidthRate : options->BandwidthRate) * 60; #define MIN_TIME_FOR_MEASUREMENT (1800) Loading Loading @@ -628,7 +631,7 @@ read_bandwidth_usage(void) interval_start_time = state->AccountingIntervalStart; expected_bandwidth_usage = state->AccountingExpectedUsage; /* Older versions of Tor (before 0.2.2.16-alpha) didn't generate these /* Older versions of Tor (before 0.2.2.17-alpha or so) didn't generate these * fields. If you switch back and forth, you might get an * AccountingSoftLimitHitAt value from long before the most recent * interval_start_time. If that's so, then ignore the softlimit-related Loading Loading
changes/bug1789 +4 −4 Original line number Diff line number Diff line o Minor features: - Be more generous with how much bandwidth we'd use up (with accounting enabled) before entering "soft hibernation". Previously, we'd hibernate once we'd used up 95% of our allotment. Now, we use up 95% of our allotment, AND make sure that we have no more than 500MB/3 hours of traffic remaining before we enter soft hibernation. Previously, we'd hibernate once we'd used up 95% of our allotment. Now, we use up 95% of our allotment, AND make sure that we have no more than 500MB (or 3 hours of expected traffic, whichever is lower) remaining before we enter soft hibernation. o Minor bugfixes: - For bandwidth accounting, calculate our expected bandwidth rate Loading
src/or/hibernate.c +6 −3 Original line number Diff line number Diff line Loading @@ -382,7 +382,10 @@ static void update_expected_bandwidth(void) { uint64_t expected; uint64_t max_configured = (get_options()->BandwidthRate * 60); or_options_t *options= get_options(); uint64_t max_configured = (options->RelayBandwidthRate > 0 ? options->RelayBandwidthRate : options->BandwidthRate) * 60; #define MIN_TIME_FOR_MEASUREMENT (1800) Loading Loading @@ -628,7 +631,7 @@ read_bandwidth_usage(void) interval_start_time = state->AccountingIntervalStart; expected_bandwidth_usage = state->AccountingExpectedUsage; /* Older versions of Tor (before 0.2.2.16-alpha) didn't generate these /* Older versions of Tor (before 0.2.2.17-alpha or so) didn't generate these * fields. If you switch back and forth, you might get an * AccountingSoftLimitHitAt value from long before the most recent * interval_start_time. If that's so, then ignore the softlimit-related Loading