New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BWE's frozen on the same value periodically #115
Comments
Hi @skmax, thank you for the issue report and the PR!
If you check the code, the size for the probe is calculated based on the period of the last probe was sent. So if the packets on the queue are too big, the size will be accumulated for the next time the probe timer is fired and eventually they will be sent. I would prefer to avoid sending padding only rtx packets for probing if there are any on the history.
The outgoing bitrate on the DTLSICETransport is updated when the Probe method is called, while the one on the SendSideBandwidthEstimation is updated when the packet is sent. So the DTLSICETransport one should be a bit lower than the one in the SendSideBandwidthEstimation, but there should not be such a huge difference. I will double check and see if there is an issue when printing the value. |
Yes, it's been accumulating, but sometimes on small bitrates I can see that it never gets to the point where the instant probeSize is bigger than at least one packet in the history if we're just increasing the target bitrate for 5% on each estimation tick.
Ok, please, let me know what you found regarding the issue. But I doubt it's a pringting problem. The probing started to work more accuratly after using the same accumulator in DTLSICETransport (see PR, please) |
@murillo128 What are your thoughts on this? Please, let me know if you need more information or logs |
I am bit hesitant to commit a change in the BWE code without a reliable way of reproducing the issue. Would it be possible to check if the issue is still reproducible with the latest media server? |
Hi @murillo128 Also, here is a demo page with the issue that I described above (it uses v0.113.2): https://github.com/skmax/media-server-demo-node/tree/bwe-debug-demo |
could you describe the steps to reproduce the issue an what is the actual vs expected result? I ran the bwe-debug-demo-latest and it is working fine. One last thing, are you running it on linux or mac? |
I think I have found the issue, please test with the latest version on the github project |
Hi @murillo128,
During the testing of the BWE mechanism, I found two issues that lead to the case when the BWE state is always
increasing
and BWE target's kept on the same value. It leads to the situation when probing is not sent even though there's more available bitrate.1. Probing is never sent if RTX history doesn't have appropriate packets.
On low bitrates the DTLSICETransport doesn't send any probing because each packet from RTX history for probing is much bigger than probing size that needs to be sent in each iteration. See https://github.com/medooze/media-server/blob/master/src/DTLSICETransport.cpp#L2613
Suggested solution: if any suitable packets can't be found in the history, generated probing should be sent
2. The calculation of probing which needs to be send looks like inconsistent
In DTLSICETransport we calculate the probing in the following way:
Calculation of
target
andbitrate
is based on the same concept of outgoing bitrate, but the outgoing bitrate value is getting from different accumulators. E.g.target
bitrate calculation is based on outgoingBitrateAccumulator in senderSideBandwidthEstimator, butprobing
calculation is based on outgoingBitrateAccumulator from DTLSICETransport.It looks like it doesn't make a lot of sense to have two accumulators here. Moreover, sometimes values from those both accumulator getting completly out of sync which leads to wrong probing calculation.
In the following logs, you can see that outgoingBitrateAccumulator from senderSideBandwidthEstimator has instant value 877728bps, but outgoingBitrateAccumulator from DTLSICETransport has instant value 294880bps. The value in DTLSICETransport is being always significantly higher during the connection. Due to this fact the estimator is stuck on increasing state, but no probing value is being sent.
Suggested solution: use outgoingBitrateAccumulator from senderSideBandwidthEstimator in DTLSICETransport::Probe in order to be consistent in calculations
Please, check the PR with suggested solutions and let me know what you think.
Thanks
The text was updated successfully, but these errors were encountered: