GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — perf(cloudfetch): cut peak memory of large CloudFetch results by vuanhphung · Pull Request #1032 · databricks/databricks-sql-python Conversation
Collaborator
What type of PR is this?
DescriptionLarge Thrift CloudFetch results used 1.3-1.7x the Arrow table size in peak RSS (a 1.7 GB This PR decompresses each file with pyarrow's LZ4 frame codec ( How is this tested?
New unit tests cover the mmap path (private mapping, exact size when Peak RSS increase during the fetch, live Thrift warehouse, median of 5 fresh processes per cell, interleaved with
Live wall time is network-bound and within noise. With the same captured files served locally over HTTPS with 60 ms latency (5 runs), Related Tickets & DocumentsNone. This pull request and its description were written by Isaac.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionspython-lz4 allocated each decompressed CloudFetch file in the download thread's malloc arena, next to short-lived response bodies. On large results the fragmentation added up to ~40% to peak RSS. Decompress with pyarrow's LZ4 frame codec into a private anonymous mmap sized from the link's bytesNum instead; the mapping goes back to the OS when the Arrow table is released. Falls back to python-lz4 when pyarrow's codec is unavailable, the size hint is wrong, or the data is corrupt. Signed-off-by: Vu Anh Phung <[email protected]> Co-authored-by: Isaac <[email protected]>
vuanhphung
had a problem deploying
to
azure-prod
vuanhphung
temporarily deployed
to
azure-prod
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 2 Low Looks good overall: the mmap path is well guarded, falls back correctly, and the edge cases are well tested. Two low concerns: per-file mappings add up on very large results, and no test runs
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Pass mmap flags explicitly instead of via **kwargs (typeshed's mmap gained a bool trackfd parameter in 3.13), annotate the IPC helpers in utils.py for pyarrow.Buffer input, and add an unpatched run() test with real LZ4 data. Signed-off-by: Vu Anh Phung <[email protected]> Co-authored-by: Isaac <[email protected]>
vuanhphung
temporarily deployed
to
azure-prod
vuanhphung
temporarily deployed
to
azure-prod
vuanhphung
had a problem deploying
to
azure-prod
vuanhphung
had a problem deploying
to
azure-prod
Collaborator
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
vuanhphung
had a problem deploying
to
azure-prod
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verdict: 1 Low Looks good overall; one low-severity note on the fallback cost. The mmap path is limited to Thrift-style
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
vuanhphung
temporarily deployed
to
azure-prod
vuanhphung
temporarily deployed
to
azure-prod
vuanhphung
had a problem deploying
to
azure-prod
Collaborator
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. This branch was previously deployed1 inactive deployment
azure-prod
—
a9b039a3
Deployed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |