-
Notifications
You must be signed in to change notification settings - Fork 0
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
DPDV-6166: Purge old unused buffers #75
Conversation
In the current version - v0.17.0:
In the fixed version:
There is no difference :/ |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
- Coverage 76.68% 75.95% -0.73%
==========================================
Files 12 12
Lines 1977 2096 +119
==========================================
+ Hits 1516 1592 +76
- Misses 380 419 +39
- Partials 81 85 +4
|
Thanks for handling this. Overall approach looks good to me (purge inactive sessions which haven't received any data for X amount of time). A couple of quick questions / comments:
|
@tomaz-s1 : |
v0.17:
v0.18:
|
@martin-majlis-s1 Great, thanks. Since that default value is end user configurable, I think it's fine to start with 30s and then adjust if / when needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
…31293) **Description:** Release unused resources after some time This PR is: * upgrading the used library from v0.17.0 to v0.18.0 * introducing new configuration option - `buffer.purge_older_than` **Link to tracking Issue:** #31292 **Testing:** Issue has been in the underlying library - scalyr/dataset-go#75 - where I have fixed the issue. ![Screenshot 2024-02-16 at 12 01 40](https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/122797378/f1c80807-69de-49c4-aa62-7edd211e3b34) **Documentation:** I have added documentation to the newly added configuration option - `buffer.purge_older_than`. Fixes #31292
…pen-telemetry#31293) **Description:** Release unused resources after some time This PR is: * upgrading the used library from v0.17.0 to v0.18.0 * introducing new configuration option - `buffer.purge_older_than` **Link to tracking Issue:** open-telemetry#31292 **Testing:** Issue has been in the underlying library - scalyr/dataset-go#75 - where I have fixed the issue. ![Screenshot 2024-02-16 at 12 01 40](https://github.com/open-telemetry/opentelemetry-collector-contrib/assets/122797378/f1c80807-69de-49c4-aa62-7edd211e3b34) **Documentation:** I have added documentation to the newly added configuration option - `buffer.purge_older_than`. Fixes open-telemetry#31292
Jira Link: https://sentinelone.atlassian.net/browse/DPDV-6166
🥅 Goal
Free resources that are no longer used. When new session is encountered some resources are allocated. They should be freed if no data has been received for that session for some time.
🛠️ Solution
Introduce new configuration option -
PurgeOlderThan
- that specifies when the resources related to the unused sessions should be cleared.This PR is also introducing new metrics -
sessions_opened
andsessions_closed
- that allow people to monitor how quickly they are creating and destroying their sessions.🏫 Testing
cd examples/stress
go build -o stress
/usr/bin/time -al ./stress --events=100000 2>&1 | tee out-10-100000-0.18.log
/usr/bin/time -al ./stress --events=100000 2>&1 | tee out-11-100000-0.17.log
Raw Data:
log-0.17.0-1708079725718.log
log-0.18.0-1708079597306.log
stress-17-vs-18.ods
🔗 Links