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

mempool: expose perfcounters for mempools; other perf counter cleanup #14982

Merged
merged 3 commits into from
Nov 6, 2018

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented May 5, 2017

No description provided.

@liewegas
Copy link
Member Author

Lots of this:

2017-05-14T18:16:27.589 INFO:tasks.ceph.osd.2.smithi176.stderr:/build/ceph-12.0.1-2390-g52f2336/src/common/mempool.cc: In function 'size_t mempool::pool_t::allocated_bytes() const' thread 7fbf9a7a2700 time 2017-05-14 18:16:27.594220
2017-05-14T18:16:27.589 INFO:tasks.ceph.osd.2.smithi176.stderr:/build/ceph-12.0.1-2390-g52f2336/src/common/mempool.cc: 66: FAILED assert(result >= 0)
2017-05-14T18:16:27.590 INFO:tasks.ceph.osd.2.smithi176.stderr: ceph version 12.0.1-2390-g52f2336 (52f2336af234f3d5e399ed60a3630166dcd593a0)
2017-05-14T18:16:27.590 INFO:tasks.ceph.osd.2.smithi176.stderr: 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x10e) [0x7fbf9fe930ce]
2017-05-14T18:16:27.590 INFO:tasks.ceph.osd.2.smithi176.stderr: 2: (()+0x9bc1d5) [0x7fbf9fe871d5]
2017-05-14T18:16:27.590 INFO:tasks.ceph.osd.2.smithi176.stderr: 3: (CephContext::_refresh_perf_values()+0x78) [0x7fbf9ff68658]
2017-05-14T18:16:27.591 INFO:tasks.ceph.osd.2.smithi176.stderr: 4: (CephContextServiceThread::entry()+0x160) [0x7fbf9ff6d620]
2017-05-14T18:16:27.591 INFO:tasks.ceph.osd.2.smithi176.stderr: 5: (()+0x8184) [0x7fbf9d9ca184]
2017-05-14T18:16:27.592 INFO:tasks.ceph.osd.2.smithi176.stderr: 6: (clone()+0x6d) [0x7fbf9caba37d]

we may need to drop the assert as it's racy? Or we tested a buggy version of the patch.

@liewegas liewegas changed the title mempool: expose perfcounters for mempools; other perf counter cleanup DNM mempool: expose perfcounters for mempools; other perf counter cleanup Jun 1, 2017
@LenzGr
Copy link
Contributor

LenzGr commented Mar 26, 2018

Found this PR here: https://trello.com/c/xoMYLms8/12-expose-mempool-metrics
Is this still under review, or has it been superseded?

@stale
Copy link

stale bot commented Oct 18, 2018

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you are a maintainer or core committer, please follow-up on this issue to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale bot added the stale label Oct 18, 2018
rgw and rbd_mirror were enabling a perfcounter monitoring the heartbeatmap.
Enable this unconditionally for all ccts.  This is simpler and more
useful!

Add a CINIT_FLAG to avoid starting them up. This is only used by the unit
tests which do not expect all the cct crap and we don't want to
break every time we add a new cct counter.  That means removing
the CephContextPerfCounters test.

Signed-off-by: Sage Weil <sage@redhat.com>
Report bytes and items for each mempool.

Signed-off-by: Sage Weil <sage@redhat.com>
@stale stale bot removed the stale label Oct 29, 2018
@liewegas liewegas changed the title DNM mempool: expose perfcounters for mempools; other perf counter cleanup mempool: expose perfcounters for mempools; other perf counter cleanup Oct 29, 2018
@liewegas
Copy link
Member Author

rebased

If we are adding up the shards, and race with some allocations and
deallocations, we might get a negative sum.  E.g., with 2 shards, intially
[0,0],

- A: read shard 0 (0)
- B: allocate object on shard 0 (now 1)
- C: dallocate object on shard 1 (now -1)
- A: read shard 1 (-1)
- A: sum is -1

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 02949bb into ceph:master Nov 6, 2018
liewegas added a commit that referenced this pull request Nov 6, 2018
* refs/pull/14982/head:
	common/mempool: tolerate sum < 0
	common/ceph_context: add perf counters for all mempools
	common/ceph_common: add heartbeat perf counters unconditionally

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants