-
Notifications
You must be signed in to change notification settings - Fork 69
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
Collect live bytes per space, and report by space #1238
Conversation
70960d1
to
50fd82a
Compare
97f0768
to
b38b80c
Compare
Using space name as the key may be inefficient. Can we use In In |
Sounds good. I have made the change. We might be able to use a runtime option for collecting live bytes data, and might be able to leave it enabled by default. I will run benchmarks first to know the overhead. Probably let's postpone the review for this PR until I get the benchmark results. |
src/scheduler/worker.rs
Outdated
MAX_SPACES | ||
); | ||
// Accumulate the live bytes for the index | ||
let mut array = self.live_bytes_per_space.borrow_mut(); |
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.
AtomicRefCell.borrow_mut()
has a cost. If this ends up being the bottleneck, we can do the borrowing in ScanObjectWork::do_work_common
just before the for
loop, and pass the &mut [...]
to increase_live_bytes
.
The following graph shows 3 runs: 1. |
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
The current
count_live_bytes_in_gc
feature adds the size of all live objects and compare with the used pages reported by the plan. There are two issues with the feature:This PR refactors the current
count_live_bytes_in_gc
feature so we collect live bytes per space, and report by space.