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

Disable Prometheus packet counters #32

Merged
merged 2 commits into from
Jul 8, 2021
Merged

Disable Prometheus packet counters #32

merged 2 commits into from
Jul 8, 2021

Conversation

onitake
Copy link
Owner

@onitake onitake commented Jul 8, 2021

prometheus.CounterVec.Inc() and .Add() aren't implemented very efficiently and can cause to performances issues when they are called frequently. Since restreamer processes each transport stream packet individually, Inc() and Add() are called for every incoming and outgoing packet. This leads to many more drops than processing only the packets would need.

The built-in performance counters don't have this issue, because they use atomic variables directly instead of locks or channels

For this reason, I'm disabling the Prometheus packet counters. Since these counters are still useful, a more efficient solution should be found.

@onitake onitake merged commit a60608f into master Jul 8, 2021
@onitake onitake deleted the disable-prom-counter branch July 8, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants