mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 22:53:44 +01:00
Set new defaults for congestion control parameters.
Defaults determined from Shadow experimentation. More parameter functionality changes to follow.
This commit is contained in:
parent
d4cf3fadec
commit
0a6cde8756
@ -35,16 +35,18 @@
|
|||||||
*
|
*
|
||||||
* More details for each of the parameters can be found in proposal 324,
|
* More details for each of the parameters can be found in proposal 324,
|
||||||
* section 6.5 including tuning notes. */
|
* section 6.5 including tuning notes. */
|
||||||
#define CIRCWINDOW_INIT (500)
|
#define SENDME_INC_DFLT (TLS_RECORD_MAX_CELLS)
|
||||||
#define SENDME_INC_DFLT (50)
|
#define CIRCWINDOW_INIT (4*SENDME_INC_DFLT)
|
||||||
|
|
||||||
#define CC_ALG_DFLT (CC_ALG_SENDME)
|
#define CC_ALG_DFLT (CC_ALG_SENDME)
|
||||||
#define CC_ALG_DFLT_ALWAYS (CC_ALG_VEGAS)
|
#define CC_ALG_DFLT_ALWAYS (CC_ALG_VEGAS)
|
||||||
|
|
||||||
#define CWND_INC_DFLT (50)
|
#define CWND_INC_DFLT (TLS_RECORD_MAX_CELLS)
|
||||||
#define CWND_INC_PCT_SS_DFLT (100)
|
#define CWND_INC_PCT_SS_DFLT (50)
|
||||||
#define CWND_INC_RATE_DFLT (1)
|
#define CWND_INC_RATE_DFLT (1)
|
||||||
|
|
||||||
|
#define CWND_MIN_DFLT (SENDME_INC_DFLT)
|
||||||
#define CWND_MAX_DFLT (INT32_MAX)
|
#define CWND_MAX_DFLT (INT32_MAX)
|
||||||
#define CWND_MIN_DFLT (MAX(100, SENDME_INC_DFLT))
|
|
||||||
|
|
||||||
#define BWE_SENDME_MIN_DFLT (5)
|
#define BWE_SENDME_MIN_DFLT (5)
|
||||||
#define EWMA_CWND_COUNT_DFLT (2)
|
#define EWMA_CWND_COUNT_DFLT (2)
|
||||||
@ -138,8 +140,8 @@ congestion_control_new_consensus_params(const networkstatus_t *ns)
|
|||||||
CWND_MAX_MIN,
|
CWND_MAX_MIN,
|
||||||
CWND_MAX_MAX);
|
CWND_MAX_MAX);
|
||||||
|
|
||||||
#define SENDME_INC_MIN 10
|
#define SENDME_INC_MIN 1
|
||||||
#define SENDME_INC_MAX (1000)
|
#define SENDME_INC_MAX (255)
|
||||||
cc_sendme_inc =
|
cc_sendme_inc =
|
||||||
networkstatus_get_param(NULL, "cc_sendme_inc",
|
networkstatus_get_param(NULL, "cc_sendme_inc",
|
||||||
SENDME_INC_DFLT,
|
SENDME_INC_DFLT,
|
||||||
@ -171,7 +173,7 @@ congestion_control_init_params(congestion_control_t *cc,
|
|||||||
const or_options_t *opts = get_options();
|
const or_options_t *opts = get_options();
|
||||||
cc->sendme_inc = params->sendme_inc_cells;
|
cc->sendme_inc = params->sendme_inc_cells;
|
||||||
|
|
||||||
#define CWND_INIT_MIN 100
|
#define CWND_INIT_MIN SENDME_INC_DFLT
|
||||||
#define CWND_INIT_MAX (10000)
|
#define CWND_INIT_MAX (10000)
|
||||||
cc->cwnd =
|
cc->cwnd =
|
||||||
networkstatus_get_param(NULL, "cc_cwnd_init",
|
networkstatus_get_param(NULL, "cc_cwnd_init",
|
||||||
@ -203,7 +205,7 @@ congestion_control_init_params(congestion_control_t *cc,
|
|||||||
CWND_INC_RATE_MIN,
|
CWND_INC_RATE_MIN,
|
||||||
CWND_INC_RATE_MAX);
|
CWND_INC_RATE_MAX);
|
||||||
|
|
||||||
#define CWND_MIN_MIN 20
|
#define CWND_MIN_MIN SENDME_INC_DFLT
|
||||||
#define CWND_MIN_MAX (1000)
|
#define CWND_MIN_MAX (1000)
|
||||||
cc->cwnd_min =
|
cc->cwnd_min =
|
||||||
networkstatus_get_param(NULL, "cc_cwnd_min",
|
networkstatus_get_param(NULL, "cc_cwnd_min",
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
#include "core/or/crypt_path_st.h"
|
#include "core/or/crypt_path_st.h"
|
||||||
#include "core/or/circuit_st.h"
|
#include "core/or/circuit_st.h"
|
||||||
|
|
||||||
|
/* The maximum whole number of cells that can fit in a
|
||||||
|
* full TLS record. This is 31. */
|
||||||
|
#define TLS_RECORD_MAX_CELLS ((16 * 1024) / CELL_MAX_NETWORK_SIZE)
|
||||||
|
|
||||||
typedef struct congestion_control_t congestion_control_t;
|
typedef struct congestion_control_t congestion_control_t;
|
||||||
|
|
||||||
/** Wrapper for the free function, set the CC pointer to NULL after free */
|
/** Wrapper for the free function, set the CC pointer to NULL after free */
|
||||||
|
@ -116,7 +116,7 @@ flow_control_new_consensus_params(const networkstatus_t *ns)
|
|||||||
CC_XON_RATE_BYTES_MAX)*RELAY_PAYLOAD_SIZE;
|
CC_XON_RATE_BYTES_MAX)*RELAY_PAYLOAD_SIZE;
|
||||||
|
|
||||||
#define CC_XON_EWMA_CNT_DFLT (2)
|
#define CC_XON_EWMA_CNT_DFLT (2)
|
||||||
#define CC_XON_EWMA_CNT_MIN (1)
|
#define CC_XON_EWMA_CNT_MIN (2)
|
||||||
#define CC_XON_EWMA_CNT_MAX (100)
|
#define CC_XON_EWMA_CNT_MAX (100)
|
||||||
xon_ewma_cnt = networkstatus_get_param(ns, "cc_xon_ewma_cnt",
|
xon_ewma_cnt = networkstatus_get_param(ns, "cc_xon_ewma_cnt",
|
||||||
CC_XON_EWMA_CNT_DFLT,
|
CC_XON_EWMA_CNT_DFLT,
|
||||||
|
@ -23,11 +23,13 @@
|
|||||||
#include "core/or/channel.h"
|
#include "core/or/channel.h"
|
||||||
#include "feature/nodelist/networkstatus.h"
|
#include "feature/nodelist/networkstatus.h"
|
||||||
|
|
||||||
#define VEGAS_GAMMA(cc) (6*(cc)->sendme_inc)
|
#define OUTBUF_CELLS (2*TLS_RECORD_MAX_CELLS)
|
||||||
#define VEGAS_ALPHA(cc) (3*(cc)->sendme_inc)
|
|
||||||
#define VEGAS_BETA(cc) (6*(cc)->sendme_inc)
|
|
||||||
|
|
||||||
#define VEGAS_BDP_MIX_PCT 0
|
#define VEGAS_ALPHA(cc) (3*OUTBUF_CELLS-TLS_RECORD_MAX_CELLS)
|
||||||
|
#define VEGAS_BETA(cc) (3*OUTBUF_CELLS)
|
||||||
|
#define VEGAS_GAMMA(cc) (3*OUTBUF_CELLS)
|
||||||
|
|
||||||
|
#define VEGAS_BDP_MIX_PCT 100
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The original TCP Vegas used only a congestion window BDP estimator. We
|
* The original TCP Vegas used only a congestion window BDP estimator. We
|
||||||
|
Loading…
Reference in New Issue
Block a user