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

mon: reduce CPU and memory manager pressure of pg health check #7482

Merged
merged 1 commit into from Feb 4, 2016

Conversation

branch-predictor
Copy link
Contributor

When we don't need details about which PGs are stuck, we can just iterate
once over pg_stat map and increase appropriate counters, no need to
repeatedly spam memory manager with stuck_pgs map population (we'll only
use its size). Even if we need details, first check if we actually have any
PGs in any of requested states, so in most cases we won't iterate needlessly
five times over all PG stat map.

This at least halves the time needed by pg health gathering (~3ms,
down from ~6-7ms) on cluster with 31832 PGs and Intel Xeon E5-2640
CPU on monitor node.

Signed-off-by: Piotr Dałek piotr.dalek@ts.fujitsu.com

When we don't need details about which PGs are stuck, we can just iterate
once over pg_stat map and increase appropriate counters, no need to
repeatedly spam memory manager with stuck_pgs map population (we'll only
use its size). Even if we need details, first check if we actually have any
PGs in any of requested states, so in most cases we won't iterate needlessly
five times over all PG stat map.

This at least halves the time needed by pg health gathering (~3ms,
down from ~6-7ms) on cluster with 31832 PGs and Intel Xeon E5-2640
CPU.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
@jecluis jecluis self-assigned this Feb 2, 2016
liewegas added a commit that referenced this pull request Feb 4, 2016
mon: reduce CPU and memory manager pressure of pg health check

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit d0ce800 into ceph:master Feb 4, 2016
@branch-predictor branch-predictor deleted the bp-faster-health branch February 4, 2016 13:37
@ghost ghost added the core label Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants