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

Improve CPU Utilization of the TSBPD Thread #3094

Open
maxsharabayko opened this issue Dec 19, 2024 · 1 comment
Open

Improve CPU Utilization of the TSBPD Thread #3094

maxsharabayko opened this issue Dec 19, 2024 · 1 comment
Labels
[core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code
Milestone

Comments

@maxsharabayko
Copy link
Collaborator

The TSBPD thread is consuming more CPU than it could be.
For example, when receiving a 25 Mbps stream on a Raspberry PI 3 (ARM Cortex A53) - the TSBPD thread consumes 10% CPU.
It could be consuming half of that.

image

Consider all the wake-up conditions. Currently there seem to be too many of them:

  • ACK being sent;
  • socket being broken or closed;
  • msg drop request received;
  • packet loss detected;
  • ...

Likely ACK being sent should not trigger TSBPD. Maybe only in the buffer mode to slow down reading.
Message drop request received should not change the next available packet in the RCV buffer, no need to reschedule TSBPD..

See also #1709.

SRT version: v1.5.4.

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Dec 19, 2024
@maxsharabayko maxsharabayko added this to the v1.5.5 milestone Dec 19, 2024
@ethouris
Copy link
Collaborator

ethouris commented Jan 6, 2025

Note that #2527 is aiming to address some of these, although it changes also the rules for the receiver buffer that add early predictions for the loss and gaps (the early implementation for this ended up with poor performance, but then it was reworked to use offset positions inside the buffer and this made things better).

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: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

No branches or pull requests

2 participants