From d8b028a18a9581d3fdb07c5c455ba206af50a798 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 24 Oct 2013 16:53:07 +0200 Subject: [KERNEL] Slow down with RTT measurements after 30 seconds Right after connecting, all servers will be polled every 4 seconds for 30 seconds, so we get 7 data points per alt-server. If no better server is found during this time, further RTT measurements will be done every 22 seconds, to put less load on the network in the long run. --- src/config.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 128edb7..7df49a0 100644 --- a/src/config.h +++ b/src/config.h @@ -71,10 +71,12 @@ // This must be a power of two: #define RTT_BLOCK_SIZE 4096 +#define STARTUP_MODE_DURATION 30 // Interval of several repeating tasks (in seconds) -#define TIMER_INTERVAL_PROBE_NORMAL 10 +#define TIMER_INTERVAL_PROBE_STARTUP 4 +#define TIMER_INTERVAL_PROBE_NORMAL 22 #define TIMER_INTERVAL_PROBE_PANIC 2 -#define TIMER_INTERVAL_KEEPALIVE_PACKET 5 +#define TIMER_INTERVAL_KEEPALIVE_PACKET 6 // Expect a keepalive response every X seconds #define SOCKET_KEEPALIVE_TIMEOUT 7 -- cgit v1.2.3-55-g7522