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] Backup groups: input rate estimation during the switch #2122

Closed
maxsharabayko opened this issue Sep 9, 2021 · 2 comments · Fixed by #2260
Closed

[BUG] Backup groups: input rate estimation during the switch #2122

maxsharabayko opened this issue Sep 9, 2021 · 2 comments · Fixed by #2260
Assignees
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

Describe the bug

When SRT is configured with SRTO_MAXBW=0 and SRTO_INPUTBW=0, SRT socket estimates the input bitrate in runtime.
However, this estimation is done by a socket individually. When a backup link is activated, the group supplies the backup socket with buffered and not yet acknowledged packets, submitted all one by one without any pacing. This would result in an overestimated input BW, and lead to an undesirably high BW limit.

Expected behavior

(Maybe) Estimate input BW when a packet is submitted to a group, and use the value for member sockets.

Versions Affected

SRT Version: all versions since experimental bonding was introduced (v1.4.2 and later), main/backup mode.

Credits

@J-Rogmann for conducting BW-related switching experiments.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Sep 9, 2021
@maxsharabayko maxsharabayko added this to the Backlog milestone Sep 9, 2021
@J-Rogmann
Copy link
Contributor

it looks like explicitly setting MAXBW doesn't help in case of switching from main to backup link. Please see following table:

I first ran into the issue when testing higher bandwidth streams with main/backup. Increasing rcvbuf helped. However, I also tried the same with a bandwidth limit of 10 Mbps on the 2 links and got pretty much the same results with MAXBWset or not set.

BW 1 (Mbps) BW 2 (Mbps) Streaming BW (Mbps) works packets dropped RCV
100 100 60 rcvbuf=37683200 sndbuf=37683200 yes 831
100 100 50 rcvbuf=37683200 sndbuf=37683200 yes 1154
         
100 100 50 no connection died on both sockets
100 100 40 rcvbuf=37683200 sndbuf=37683200 yes 240
100 100 40 yes 446
    30 rcvbuf=37683200 sndbuf=37683200 yes 0
100 100 30 yes 2
100 100 20 yes 0
100 100 10 yes 0
10 10 9 yes 496
10 10 8 yes 555
10 10 7 yes 285
10 10 6 yes 349
10 10 5 yes 120
10 10 4 yes 0
10 10 3 yes 0
10 10 2 yes 0
10 10 1 yes 0
with MAXBW        
10 10 9 maxbw=1250000 yes 490
10 10 8 maxbw=1250000 yes 389
10 10 7 maxbw=1250000 yes 482
10 10 6 maxbw=1250000 yes 332
10 10 5 maxbw=1250000 yes 119
10 10 4 maxbw=1250000 yes 1
10 10 3 maxbw=1250000 yes 0
10 10 2 maxbw=1250000 yes 0
10 10 1 maxbw=1250000 yes 0

@ethouris
Copy link
Collaborator

ethouris commented Sep 9, 2021

There could be done information interchange between the active link and the group, then forceful injecting this information into the newly activated socket so that it starts freshly with already prepared data over the other link.

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
4 participants