diff options
author | Simon Rettberg | 2013-10-24 16:53:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-10-24 16:53:07 +0200 |
commit | d8b028a18a9581d3fdb07c5c455ba206af50a798 (patch) | |
tree | b4cf226cf7d6c9c1fc7224f7ff686c0d051df09d /src/config.h | |
parent | [SERVER] Only mark server as bad on unecpected error (diff) | |
download | dnbd3-d8b028a18a9581d3fdb07c5c455ba206af50a798.tar.gz dnbd3-d8b028a18a9581d3fdb07c5c455ba206af50a798.tar.xz dnbd3-d8b028a18a9581d3fdb07c5c455ba206af50a798.zip |
[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.
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 6 |
1 files changed, 4 insertions, 2 deletions
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 |