Exit 节点端Vegas算法流程:
收到一个circuit-level SENDME之后,调用sendme_process_circuit_level
sendme_process_circuit_level调用 congestion_control_dispatch_cc_alg
congestion_control_dispatch_cc_alg调用 congestion_control_vegas_process_sendme
congestion_control_vegas_process_sendme调用congestion_control_update_circuit_estimates
congestion_control_update_circuit_estimates调用 congestion_control_update_circuit_rtt和 congestion_control_update_circuit_bdp()
cwnd_max默认值2147483647

cwnd_inc默认值为1,cwnd_inc_rate = 31, alpha = 186, beta = 248, delta = 310
基本遵循默认,每三小时从隐藏服务目录获取一次共识获取这五个值,可以认为在执行比较短的时间下载的时候不会有任何变化。

cwnd理论上是允许排队+飞行的窗口,BDP是根据当前计算出来的理论能承受带宽,queue_use是理论能排队的值。
Vegas算法直接调整的是cwnd,cwnd调大了之后会发cwnd - inflight个cell(或者说允许发)
默认的cwnd每次只增加1, 效果非常小,于是控制Exit节点把cwnd_inc调整到32。
cwnd_inc 强制为32的时候:

