Browse Source

Adjust download schedules per teor's #20534 recommendataions

Nick Mathewson 7 years ago
parent
commit
667ba776b1
3 changed files with 7 additions and 5 deletions
  1. 4 2
      changes/bug20534
  2. 2 2
      src/or/config.c
  3. 1 1
      src/or/directory.c

+ 4 - 2
changes/bug20534

@@ -2,5 +2,7 @@
     - Remove the maximum delay on exponential-backoff scheduling.
     - Remove the maximum delay on exponential-backoff scheduling.
       Since we now allow an infinite number of failures (see ticket
       Since we now allow an infinite number of failures (see ticket
       20536), we must now allow the time to grow longer on each failure.
       20536), we must now allow the time to grow longer on each failure.
-      Fixes bug 20534; bugfix on 0.2.9.1-alpha.
-
+      Fixes part of bug 20534; bugfix on 0.2.9.1-alpha.
+    - Use initial delays and decrements in download scheduling closer to
+      those from 0.2.8. Fixes another part of bug 20534; bugfix on
+      0.2.9.1-alpha.

+ 2 - 2
src/or/config.c

@@ -501,7 +501,7 @@ static config_var_t option_vars_[] = {
    * When clients have authorities and fallbacks available, they use these
    * When clients have authorities and fallbacks available, they use these
    * schedules: (we stagger the times to avoid thundering herds) */
    * schedules: (we stagger the times to avoid thundering herds) */
   V(ClientBootstrapConsensusAuthorityDownloadSchedule, CSV_INTERVAL,
   V(ClientBootstrapConsensusAuthorityDownloadSchedule, CSV_INTERVAL,
-    "10, 11, 3600, 10800, 25200, 54000, 111600, 262800" /* 3 days + 1 hour */),
+    "6, 11, 3600, 10800, 25200, 54000, 111600, 262800" /* 3 days + 1 hour */),
   V(ClientBootstrapConsensusFallbackDownloadSchedule, CSV_INTERVAL,
   V(ClientBootstrapConsensusFallbackDownloadSchedule, CSV_INTERVAL,
     "0, 1, 4, 11, 3600, 10800, 25200, 54000, 111600, 262800"),
     "0, 1, 4, 11, 3600, 10800, 25200, 54000, 111600, 262800"),
   /* When clients only have authorities available, they use this schedule: */
   /* When clients only have authorities available, they use this schedule: */
@@ -512,7 +512,7 @@ static config_var_t option_vars_[] = {
    * blackholed. Clients will try 3 directories simultaneously.
    * blackholed. Clients will try 3 directories simultaneously.
    * (Relays never use simultaneous connections.) */
    * (Relays never use simultaneous connections.) */
   V(ClientBootstrapConsensusMaxInProgressTries, UINT, "3"),
   V(ClientBootstrapConsensusMaxInProgressTries, UINT, "3"),
-  V(TestingBridgeDownloadSchedule, CSV_INTERVAL, "3600, 900, 900, 3600"),
+  V(TestingBridgeDownloadSchedule, CSV_INTERVAL, "1200, 900, 900, 3600"),
   V(TestingClientMaxIntervalWithoutRequest, INTERVAL, "10 minutes"),
   V(TestingClientMaxIntervalWithoutRequest, INTERVAL, "10 minutes"),
   V(TestingDirConnectionMaxStall, INTERVAL, "5 minutes"),
   V(TestingDirConnectionMaxStall, INTERVAL, "5 minutes"),
   V(TestingConsensusMaxDownloadTries, UINT, "8"),
   V(TestingConsensusMaxDownloadTries, UINT, "8"),

+ 1 - 1
src/or/directory.c

@@ -3798,7 +3798,7 @@ next_random_exponential_delay(int delay, int max_delay)
   int max_increment;
   int max_increment;
 
 
   if (delay)
   if (delay)
-    max_increment = delay; /* no more than double. */
+    max_increment = delay * 4; /* no more than quintuple. */
   else
   else
     max_increment = 1; /* we're always willing to slow down a little. */
     max_increment = 1; /* we're always willing to slow down a little. */