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

Add memory tracking to Enumeration loading #4395

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

davisp
Copy link
Contributor

@davisp davisp commented Oct 3, 2023

This adds a new MemoryTracker type for tracking Enumeration data usage.


TYPE: IMPROVEMENT
DESC: Add memory tracking to Enumeration loading

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #32987: [CORE] Add enumeration data to memory budgeting.

@davisp davisp requested a review from KiterLuc October 3, 2023 18:40
@davisp davisp force-pushed the pd/sc-32987/add-enumeration-memory-tracking branch 2 times, most recently from e3b28ee to 048f310 Compare October 3, 2023 21:11
auto timer_se = resources_.get().stats().start_timer("sm_load_enumeration");

auto enmr_uri = uri_.join_path(constants::array_schema_dir_name)
.join_path(constants::array_enumerations_dir_name)
.join_path(enumeration_path);

uint64_t size = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the tile size below to prevent the file size operation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We sure can!

Though for others, we chatted real quick OOB and went through a couple permutations of passing the MemoryTracker to GenericTileIO::load then passing the file size read instead of the tracker to avoid the duplicate file sizes. And then we figured out that the file size isn't correct anyway since its the compressed size. So now we're back to using tile.size() instead and future work will be required to preemptively check whether we can load before reading.

@davisp davisp force-pushed the pd/sc-32987/add-enumeration-memory-tracking branch from 048f310 to e224117 Compare October 3, 2023 22:00
This adds a new MemoryTracker type for tracking Enumeration data usage.
@davisp davisp force-pushed the pd/sc-32987/add-enumeration-memory-tracking branch from e224117 to 0567f03 Compare October 4, 2023 14:16
@KiterLuc KiterLuc merged commit a6cf302 into dev Oct 4, 2023
53 checks passed
@KiterLuc KiterLuc deleted the pd/sc-32987/add-enumeration-memory-tracking branch October 4, 2023 16:36
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.

None yet

2 participants