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 statistics of late packets in depacketizer #658

Open
gavv opened this issue Dec 6, 2023 · 5 comments
Open

Improve statistics of late packets in depacketizer #658

gavv opened this issue Dec 6, 2023 · 5 comments
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project enhancement help wanted An important and awaited task but we have no human resources for it yet networking Network I/O and algorithms

Comments

@gavv
Copy link
Member

gavv commented Dec 6, 2023

Problem

Depacketizer class converts sequence of network packets into stream of audio frames.

Among other things, it detects and logs late packets. If packet is missing when it's needed, depacketizer inserts zeros instead of it. If that missing packet arrives later when it's not needed anymore, depacketizer prints messages to log and drops packet.

There are two problems with these log messages:

  • they may be too frequent sometimes
  • they are not very informative

Solution

  1. Rate-limit messages. Don't report every drop. Instead, report cumulative number of drops periodically. We have core::RateLimiter for this task. You can search code base to see how it is used.

  2. Print additional simple statistics about drops:

    • dropped packet count during period
    • processed packed count during period
    • maximum delay of dropped packet

Delay is the difference of dropped packet timestamp and current depacketizer timestamp, converted to nanoseconds (SampleSpec has a method for it).

Testing

Run roc-recv and roc-send over Wi-Fi. Use loaded or noisy networks and set --sess-latency of roc-recv low enough to observe packet drops.

Docs: https://roc-streaming.org/toolkit/docs/tools/command_line_tools.html

@gavv gavv added enhancement help wanted An important and awaited task but we have no human resources for it yet easy hacks The solution is expected to be straightforward even if you are new to the project networking Network I/O and algorithms labels Dec 6, 2023
@gavv gavv added this to Frontlog in kanban board Dec 6, 2023
@gavv gavv moved this from Frontlog to Help wanted in kanban board Dec 6, 2023
@gavv gavv changed the title Improve logging of late packets in depacketizer Improve statistics of late packets in depacketizer Dec 6, 2023
@esseciego
Copy link

I would like to work on this issue

@gavv
Copy link
Member Author

gavv commented Jan 28, 2024

Welcome, thanks!

@gavv
Copy link
Member Author

gavv commented May 14, 2024

@esseciego Hi! Do you have any plans on this?

@esseciego
Copy link

No sorry I don't ;-;;;

@gavv
Copy link
Member Author

gavv commented May 15, 2024

@esseciego No worries :)

Unassigning, so that someone could pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy hacks The solution is expected to be straightforward even if you are new to the project enhancement help wanted An important and awaited task but we have no human resources for it yet networking Network I/O and algorithms
Projects
kanban board
Help wanted
Development

No branches or pull requests

2 participants