Uh oh!
There was an error while loading. Please reload this page.
Improve configuration and resource use of MemoryManager and DiskManager - #1668
Merged
Conversation
alamb
commented
Jan 24, 2022
| self | ||
| } | ||
| /// Use an an existing [MemoryManager] |
ContributorAuthor
There was a problem hiding this comment.
Here is the new public API
alamb
commented
Jan 24, 2022
| Ok(()) | ||
| #[tokio::test] | ||
| #[should_panic(expected = "invalid max_memory. Expected greater than 0, got 0")] |
ContributorAuthor
There was a problem hiding this comment.
previously such config errors would panic
| let ctx2 = ExecutionContext::with_config(config); | ||
| assert!(std::ptr::eq(Arc::as_ptr(&memory_manager), Arc::as_ptr(&ctx1.runtime_env().memory_manager))); |
ContributorAuthor
There was a problem hiding this comment.
Here is the tests for the primary usecase we have in IOx -- sharing DiskManager and MemoryManagers across plans
alambforce-pushed
the
alamb/memory_and_disk_config
branch
from
January 24, 2022 18:19
dfbd077 to
87c541aComparealamb
commented
Jan 24, 2022
ContributorAuthor
yjshen
approved these changes
Jan 25, 2022
yjshen
left a comment
Member
There was a problem hiding this comment.
Great config design! I really like the introduced enum configs.
alamb
commented
Jan 25, 2022
ContributorAuthor
Thanks @yjshen -- I think since this basically only affects you and I for the time being I will update this PR and merge it in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which issue does this PR close?
Resolves#1636
Rationale for this change
Creation of an
RuntimeEnvcreates a temporary directory, even when it is not used. This is unecessary per-query overheadAlso, since there is no way to share
MemoryMangerandDiskManagers acrossRuntimeEnv'sit is not possible to get a "global" view of memory / disk use across multiple queries running concurrently.Also, certain invalid memory configuration values will panic, rather than error when set incorrectly
What changes are included in this PR?
Changes:
DiskManagerConfigandMemoryManagerConfigfor configuring how disk and memory are managedMemoryManagerandDiskManagerrather than always creating them newAre there any user-facing changes?
Will be a change to anyone who was using the RuntimeConfig but since it was introduced recently I don't think that is very many