-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 debug log when waiting for spilling on other consumers #1933
Conversation
@@ -340,6 +340,9 @@ impl MemoryManager { | |||
} else if current < min_per_rqt { | |||
// if we cannot acquire at lease 1/2n memory, just wait for others | |||
// to spill instead spill self frequently with limited total mem | |||
debug!( | |||
"Cannot acquire minimum amount of memory {}, waiting for others to spill ...", | |||
human_readable_size(min_per_rqt)); |
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.
I'm also thinking if it makes sense to measure the time spent on the wait and log it?
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.
Yeah, that makes sense.
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.
How do you like to also log memory manager status as well?
impl Display for MemoryManager {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
write!(f,
"MemoryManager usage statistics: total {}, trackers used {}, total {} requesters used: {}",
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.
sounds good
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.
One more thought, based on your measure timing comments above, probably we could warn!
if we've waited for a longer time than some threshold? In case reproducing the race would be hard. debug!
at the first round might not be revealed in the first place?
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.
warn!
sounds better. Do you think we need to have warn!
for all log here? Or just for longer time case?
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.
For the longer time case, I suggest.
cc @yjshen |
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.
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 @viirya ❤️
Which issue does this PR close?
Closes #1932.
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?