-
Notifications
You must be signed in to change notification settings - Fork 39
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
Host budget metering, cost model, calibration changes #704
Conversation
Properly take into account baseline in measurements wip
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 haven't fully reviewed this yet, 11 files are still remaining.
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.
Generally good! Very glad to see:
- Number of cost types shrinking, eliminating duplication and ambiguity
- Smaller, simpler and more precise calibration functions
- Simpler models
- Actual calibration results that are closer to reality
Handful of nits noted in review, and some questions and concerns, broadly speaking:
- Might want to avoid the
forget
calls in favour of a pass/return protocol - Might want to
black_box
some stuff - Some of the byte-growth metering seems like it's overcharging
- Calibration numbers seem like a few have noise in them or don't make sense
- A few calibration functions don't seem like they're counting exactly what they should
@graydon I have just pushed three commits that addresses your major concerns:
|
@jayz22 ok I've marked most of the issues I had as resolved, and added a few very minor nits around saturating adds. I think mostly I'm good with this now, though there's still a bunch of commentary from @dmkozh to resolve as well. I'm happy to merge it whenever ready (and I concur it'd be nice to get into this release, which is starting tomorrow, so if you and @dmkozh could give it some focused time this afternoon maybe we can make it?) |
This reverts commit efa732f.
What
This is a set of sweeping changes/fixes/cleanups to host calibration and metering:
HostMemAlloc/Cpy/Cmp
for host memory allocation, copy, and comparisonScVecToHostVec
,CloneEvents
,HostObjAllocSlot
, and the single byte cost types i.e.BytesPush/Pop/Insert/Del
.Clean up unused model terms: log, quadratic
Add a "baseline" calibration and subtract it from the actual measurements for more accurate results
Remove sample deallocation (using
std::mem::forget
) from the measurement results for better accuracy.Various fixes:
ChargeBudget
was previously not increasing the inputmetered_scan_slice_of_slices
test_declared_size
was being too strict (usingassert_eq
instead ofle
), resulting in failure in CI but passes locally.CostType
to theBudget
, addDebug
impl for it.Below are the calibration output.
output6.txt
Why
[TODO: Why this change is being made. Include any context required to understand the why.]
Known limitations
[TODO or N/A]