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

Sending is forced upon incoming NAK #1738

Closed
maxsharabayko opened this issue Jan 13, 2021 · 2 comments
Closed

Sending is forced upon incoming NAK #1738

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

Comments

@maxsharabayko
Copy link
Collaborator

When SRT receives a NAK report, it immediately (re-)schedules a sending event over an SRT socket, ignoring any pacing restrictions.
As a result of this rescheduling, only the first packet in the sender's loss list will be retransmitted immediately, the rest will follow pacing restrictions.
In case there is a lot of NAK reports arriving, pacing restrictions might be notably violated.

See this line in CUDT::processCtrlLossReport(..):

m_pSndQueue->m_pSndUList->update(this, CSndUList::DO_RESCHEDULE);

Versions

  • SRT Versions: v1.4.2 and prior.

Related issue: #713.

Note: The same behavior was in UDT.

TODO

Investigate if it makes sense to force sending in case NAK report is received. Logically, if there is already a scheduled time for the next sending operation, it should be followed, even if it will be retransmission instead of sending of the next original packet.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Jan 13, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Jan 13, 2021
@maxsharabayko maxsharabayko changed the title Sending is forces upon incoming NAK Sending is forced upon incoming NAK Jan 13, 2021
@jeandube
Copy link
Collaborator

The UDT output pace was entirely controlled by the congestion control algorithm designed for readily available input data such as a file and variation was less critical than for live feed which SRT tries to address.

I think SRT output pace rate follows the setting better when there is a lost list because for a real time feed the normal output pace setting is the input stream rate plus an overhead for retransmission. The loss list acts as a file with available packets to transmit when the scheduled time to transmit (determined by output pacing) comes. while in absence of loss and an output-pace being input pace + overhead% there is often an empty sending buffer when the sending time comes. This is something I wanted to address before submitting the Output Pace Mode PR. Currently the overhead is applied all the time, with or without loss, with the naïve idea to take some advance in case of loss in the future but this does not work with a real time feed. One possible solution would be to apply the overhead to the output pace only in presence of loss. Overhead that could be proportional to the lost list size or loss rate.

Sorry to hijack this issue with these details not completely related to the question asked. To answer I think that retransmission of lost packets shall follow the output packing since it already accounts for lost.

@maxsharabayko
Copy link
Collaborator Author

Fixed in PR #2232

@maxsharabayko maxsharabayko modified the milestones: Backlog, v1.4.5 Feb 1, 2022
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