-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add SYSTEM_PEAK_BUFFER_MANAGER_MEMORY
and SYSTEM_PEAK_TEMP_DIRECTORY_SIZE
to profiler
#17164
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
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.
PR looks great, I really like the changes that make some code parts (global metrics and aggregating metrics) more generic! Just left a few nits. :)
double time; | ||
idx_t elements_returned; | ||
idx_t result_set_size; | ||
idx_t system_peak_buffer_manager_memory; | ||
idx_t system_peak_temp_directory_size; |
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.
Given that we keep likely keep expanding these, and since this PR also adds two additional parameters to the constructor: should we maybe move these into a struct
? Something like OperatorInfoMetrics
. 🤔
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.
It's already struct OperatorInformation
, but I agree that this constructor is getting out of hand. I checked, and nowhere in the code base are we using the constructor; we always use the defaults. So instead, I've removed the arguments from the constructor, and made it so the values are initialized within the structure, which I think is a lot cleaner.
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.
Yes, great! 👍
Thanks for the feedback @taniabogatsch! I've implemented it, and the code is looking cleaner now :) |
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.
Looks good to me now!
Thanks! |
Add `SYSTEM_PEAK_BUFFER_MANAGER_MEMORY` and `SYSTEM_PEAK_TEMP_DIRECTORY_SIZE` to profiler (duckdb/duckdb#17164)
Add `SYSTEM_PEAK_BUFFER_MANAGER_MEMORY` and `SYSTEM_PEAK_TEMP_DIRECTORY_SIZE` to profiler (duckdb/duckdb#17164)
Add `SYSTEM_PEAK_BUFFER_MANAGER_MEMORY` and `SYSTEM_PEAK_TEMP_DIRECTORY_SIZE` to profiler (duckdb/duckdb#17164)
Measures the peak buffer manager memory usage and temp directory size of the entire system during the query. We could consider expanding this to more query-specific metrics in the future, but these numbers are already easily available; this just exposes them.
They are not enabled by default, but maybe they should be? I would be happy to receive feedback on this.