yuanrongxi / razor

A google's congestion Control Algorithm
MIT License
352 stars 152 forks source link

关于带宽估计算法的细节有一些疑问 #50

Closed Tyler-ytr closed 2 years ago

Tyler-ytr commented 2 years ago

袁老师您好!我正在阅读您编写的源码以及gcc的源码来学习这块的带宽估计机制; 在delay_bwe_maybe_update函数的

        else if (acked_bitrate == 0 && bwe->rate_control->inited == 0 
            && aimd_time_reduce_further(bwe->rate_control, now_ts, bwe->rate_control->curr_rate * 3 / 4 - 1) == 0){ /*带宽过载且没统计到新的acked带宽,进行减半处理*/
            aimd_set_estimate(bwe->rate_control, bwe->rate_control->curr_rate * 3 / 4, now_ts);
            result.updated = 0;
            result.probe = -1;
            result.bitrate = bwe->rate_control->curr_rate;
        }

部分,您的注释写的是减半处理,在GCC最新的源码中也是1/2,请问这部分改成3/4是实践上更加有优势吗?

yuanrongxi commented 2 years ago

感谢,这个地方可能是我修改出来的BUG,应该是: else if (acked_bitrate == 0 && bwe->rate_control->inited == 0 && aimd_time_reduce_further(bwe->rate_control, now_ts, bwe->rate_control->curr_rate 1 / 2 - 1) == 0){ /带宽过载且没统计到新的acked带宽,进行减半处理/ aimd_set_estimate(bwe->rate_control, bwe->rate_control->curr_rate 3 / 4, now_ts); result.updated = 0; result.probe = -1; result.bitrate = bwe->rate_control->curr_rate; }

ihewro commented 2 years ago

@Tyler-ytr 你好,想请教一下你看的官方gcc源码是指webrtc里面实现的吗

Tyler-ytr commented 2 years ago

@Tyler-ytr 你好,想请教一下你看的官方gcc源码是指webrtc里面实现的吗

是的,你可以在https://webrtc.googlesource.com/src找到下载的链接