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
common: OpTracker age histogram calculation is not correct #5065
Conversation
@tchaikov do you have time to take a look at this one? I'm wondering if I could also include this one in the teuthology run together with my others. |
@wonzhq do you have access to a teuthology cluster ? |
@dachary yes, we have a local teuthology cluster. And I can also access sepia. |
@wonzhq will review it shortly. it fell off the cracks =( |
@wonzhq the fix makes sense to me. the only concern is that the size of
return x ? (sizeof(x) * 8 - __builtin_clz(x)) : 0;
what do you think? |
@tchaikov thanks for taking a look!
I'd like to leave this to someone else since I'm not quite clear which one performs better and if it is worth doing this.
Good idea! But why not do |
i just don't like the overhead of _expand_to(bin + 1);
///
_contract(); calls. but yeah, i'd admit that's a sign of premature optimisation. as this function is called every 6 seconds. |
yeah, makes sense to me. i will do some benchmark on my side. |
Since we loops from the oldest to the newest, most likely we just need to expand/contract the vector only once, which is the same as |
agreed, they will be just no-ops. |
7a9243f
to
72ebc05
Compare
@tchaikov i've updated this PR, please take another look, thanks! |
While the TrackedOps in each sharded list are ordered, there are no order among different shared lists. Looping the sharded list one by one won't be able to get the right histogram. Instead, we can increment the bin count for each of the TrackedOp. Btw, for those TrackedOp whose age is >= 2^30 ms, they are now been put in the respective number of bits bin, instead of been put in a single bin. Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
72ebc05
to
567dd1e
Compare
Looks like after updating the commit message, @tchaikov 's comment is gone. I'm pasting his previous comment below:
|
I don't know how the histogram bits work. @athanatos is back beginning of next week, ask him. ;) |
common: OpTracker age histogram calculation is not correct Reviewed-by: Kefu Chai <kchai@redhat.com>
While the TrackedOps in each sharded list are ordered, there are no
order among different shared lists. Looping the sharded list one by one
won't be able to get the right histogram.
Signed-off-by: Zhiqiang Wang zhiqiang.wang@intel.com