Skip to content
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

os/bluestore: fix global commit latency #12356

Merged
merged 1 commit into from Dec 8, 2016

Conversation

xiexingguo
Copy link
Member

"start" is used to calculate the global bluestore commit latency
and hence shall not be updated at each internal state enter/exit.

Otherwise the l_bluestore_commit_lat counter won't reflect the
real commit latency precisely.

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

"start" is used to calculate the global bluestore commit latency
and hence shall not be updated at each internal state enter/exit.

Otherwise the l_bluestore_commit_lat counter won't reflect the
real commit latency precisely.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@liewegas
Copy link
Member

liewegas commented Dec 7, 2016

I think the idea was for this to log the latency in each state. Perhaps the perfcounter just needs to be renamed so that it doesn't imply it's more than just a single state?

@xiexingguo
Copy link
Member Author

xiexingguo commented Dec 8, 2016

But from FileStore, the os_apply_latency is recording the latency of a transaction from FileStore::queue_transactions to FileStore::_finish_op.

I think BlueStore shall at least keep pace with FileStore(though it has identical os_commit_latency and os_apply_latency) by updating start of txc at constructing only. And then by doing:

void BlueStore::_txc_finish_kv(TransContext *txc)
logger->tinc(l_bluestore_commit_lat, ceph_clock_now(g_ceph_context) - txc->start);

l_bluestore_commit_lat will reflects the exact latency of the transaction between arriving at BlueStore and finished, which is the same as FileStore.

Otherwise start is a pure dup of last_stamp and hence can be eliminated.

@liewegas liewegas merged commit 3f6219c into ceph:master Dec 8, 2016
@xiexingguo xiexingguo deleted the xxg-wip-bluestore-commit-latency branch December 8, 2016 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants