Skip to content
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

[BUG] Receiver buffer (msRcvBuf) remains at the same low level of 10ms #1937

Open
mbakholdina opened this issue Apr 13, 2021 · 0 comments
Open
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@mbakholdina
Copy link
Collaborator

mbakholdina commented Apr 13, 2021

Describe the bug

For test cases 1, 2, 4, 5 (see below), the level of receiver buffer (msRcvBuf) is not correct, converges to 10 ms and remains at this level for the whole experiment. For test cases 1, 4, we have latency configured incorrectly: for such a high RTT value it should be at least 3-4 times RTT. For test cases 2, 5, the latency is set to 4RTT, however, the receiver buffer rcvbuf is too small for such a sendrate and latency values. However, this isn't an expected behavior.

Also, for test cases 2, 5, the problem "No room to store incoming packet" can be easily catched. See issue #409, PR #1909.

The problem with receiver buffer level isn't a regression as we have the same test results for both v1.4.2 and the latest master (v1.4.3rc + some commits on top of).

For test cases 3, 6, when the latency and rcvbuf are configured correctly, there is no problems. However, for case 3, rcvbuf = 2812500 isn't enough. The msRcvBuf remains at the level of 2RTT instead of 1RTT. If we increase rcvbuf = 5625000 twice (case 6), the msRcvBuf remains at the level of 1RTT as expected. It means that the formula used for rcvbuf calculation (see below) should be made more precise.

Test Case sendrate, Mbps RTT, ms latency, ms rcvbuf, bytes SRT version Test Result
1 10 500 120 (default) 462500 v1.4.3rc Rcv buffer remains at the same level of 10 ms
2 10 500 2000 (4RTT) 462500 (buffer size is too small for such latency and bitrate) v1.4.3rc No room to store incoming packet Rcv buffer remains at the same level of 10 ms
3 10 500 2000 (4RTT) 2812500 v1.4.3rc No problems with buffer, msSndBuf is around 2RTT
4 10 500 120 (default) 462500 v1.4.2 Rcv buffer remains at the same level of 10 ms
5 10 500 2000 (4RTT) 462500 (buffer size is too small for such latency and bitrate) v1.4.2 No room to store incoming packet Rcv buffer remains at the same level of 10 ms
6 10 500 2000 (4RTT) 5625000 (2 times higher than in 3) v1.4.3rc No problems with buffer, msSndBuf is around RTT

Experiment time = 120 s.

The value of rcvbuf is calculated using the following formula (see #703):
(latency_ms + rtt_ms / 2) * bps / 1000 / 8

Statistics of interest are byteAvailableRcvBuf, msRcvBuf.

Screenshot for test case 1 - At the beginning of the transmission.
Screenshot 2021-04-12 at 14 57 43

Screenshot for test case 1 - During transmission.
Screenshot 2021-04-12 at 14 58 11

To Reproduce

srt-xtransmit should be used for a reproduction:

# rcv
_build/bin/srt-xtransmit receive "srt://:4200?latency=2000&rcvbuf=2812500" --enable-metrics --metricsfile metrics-rcv.csv --metricsfreq 100ms --statsfile stats-rcv.csv --statsfreq 100ms -v

# snd
_build/bin/srt-xtransmit generate srt://192.168.2.2:4200?latency=2000 --sendrate 10Mbps --duration 120s --enable-metrics --statsfile stats-snd.csv --statsfreq 100ms -v

SRT version tested:

  • v1.4.2
  • v1.4.3rc + some commits on top of, the latest commit is
    commit c3864aa
    Author: Jose Santiago jsantiago@haivision.com
    Date: Mon Apr 12 03:49:26 2021 -0500

Experiments results are attached.
rcv-buffer-fullness.zip

@mbakholdina mbakholdina added the Type: Bug Indicates an unexpected problem or unintended behavior label Apr 13, 2021
@mbakholdina mbakholdina changed the title [BUG] Receiver buffer remains at the same low level (msRcvBuf = 10ms) [BUG] Receiver buffer (msRcvBuf) remains at the same low level of 10ms Apr 13, 2021
@mbakholdina mbakholdina added the [core] Area: Changes in SRT library core label Apr 13, 2021
@mbakholdina mbakholdina added this to the v1.4.3 milestone Apr 13, 2021
@maxsharabayko maxsharabayko modified the milestones: v1.4.3, v1.4.4 Apr 14, 2021
@maxsharabayko maxsharabayko modified the milestones: v1.4.4, Backlog Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants