-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ENH]: garbage collection fixes to get manual E2E test working #4152
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
e600e31
to
23ded28
Compare
de70cd3
to
5108577
Compare
23ded28
to
3ee3a6b
Compare
5108577
to
ce1ff5e
Compare
if !all_files.is_empty() { | ||
let mut delete_stream = futures::stream::iter(all_files.clone()) | ||
.map(move |file_path| self.delete_with_path(file_path)) | ||
.buffer_unordered(100); |
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.
greatly reduces peak memory usage when GC'ing a large set of files--went from a peak of > 512MB (was OOMing) to a peak < 75MB
I don't have a principled reason for setting this to 100. Seems to work well for now though. I would be open to changing this to use the admission controlled S3 impl, just unsure if it makes sense to use the same admission controller for uploads/downloads and deletes.
3ee3a6b
to
0dd3668
Compare
ce1ff5e
to
3f8ab80
Compare
0dd3668
to
2b2e0c5
Compare
3f8ab80
to
5efd3ae
Compare
2b2e0c5
to
08d6da5
Compare
5efd3ae
to
cf8aa16
Compare
08d6da5
to
88d46bb
Compare
cf8aa16
to
628e81f
Compare
88d46bb
to
21544ef
Compare
628e81f
to
d3850af
Compare
3039249
to
c56d313
Compare
d3850af
to
8053f73
Compare
c56d313
to
3c54906
Compare
8053f73
to
928480d
Compare
928480d
to
c1d52de
Compare
Merge activity
|
…a-core#4152) ## Description of changes - Removed variables from tracing calls which are unbounded in size (Jaeger dropped spans while testing because they were too large). - Added a concurrency limit for S3 deletion calls and consumed futures as a stream instead of collecting them first. Greatly reduced peak memory usage and fixed an OOM in the garbage collector service when running in Tilt with a memory limit of 512MiB. - Fixed the garbage collector component to compute the absolute cutoff time every run instead of computing once on startup. Prior to this change, the absolute cutoff time was constant over the lifetime of the service, which meant versions created after service startup were never GC'ed. ## Test plan *How are these changes tested?* Tested by creating a collection with 10 versions (using SciDocs) and observed that garbage collection was successful. - [x] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* n/a
Description of changes
Test plan
How are these changes tested?
Tested by creating a collection with 10 versions (using SciDocs) and observed that garbage collection was successful.
pytest
for python,yarn test
for js,cargo test
for rustDocumentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
n/a