If we finish recovery/backfill and go active, but also get
preempted at the same time, we can ignore the event.
Signed-off-by: Sage Weil <sage@redhat.com>
If a PG has a higher recovery priority and a lower-priority item is in
progress, allow it to be preempted. This triggers the RecoveryCancel
or BackfillCancel event with a 0 delay, which means it will immediately
re-request a reservation (and presumably wait).
Signed-off-by: Sage Weil <sage@redhat.com>
If an (optional) preemption context is provided, use that to preempt
and existing reservation and grant a higher-priority one.
Signed-off-by: Sage Weil <sage@redhat.com>
This awkwardly involves re-ordering some definitions
in perf_counters.h in order to refer to the prio
names defined in PerfCountersBuilder.
Signed-off-by: John Spray <john.spray@redhat.com>
The module self test commands give us a chance to
catch any other ceph changes that change something
that a module was relying on reading.
Signed-off-by: John Spray <john.spray@redhat.com>
These have had their priorities bumped up to
USEFUL, so they'll appear in the default
get_all_counters output.
Signed-off-by: John Spray <john.spray@redhat.com>
We can be quite liberal here, because mons are
small in number. However, we don't want to expose
KV database counters at this database from OSDs, so
use the prio_adjust mechanism for that.
Signed-off-by: John Spray <john.spray@redhat.com>
These are broadly the OSD-wide IO stats, which happen
to also be the ones that were named in the
prometheus plugin until I changed it to be
priority-based.
Signed-off-by: John Spray <john.spray@redhat.com>
Let the caller set a priority as the defaul, to enable them
to create a bunch at a given priority. This is just a
convenience.
Signed-off-by: John Spray <john.spray@redhat.com>
...and also trim down the configuration to what's really
needed. In general users don't need to pick and choose
metrics. We could add it back if there was a strong
motivation.
Signed-off-by: John Spray <john.spray@redhat.com>
The idea of self-test commands is that they're self
contained and just exercise the module's calls
to the Ceph-side.
Signed-off-by: John Spray <john.spray@redhat.com>
- Use new get_all_perf_counters path
- Consequently get counters for all daemons, not just OSD
- Tag stats with ceph_daemon rather than osd_id, as some
stats appear from more than one daemon type
- Remove summing of perf counters, external TSDB and/or queries
can do this.
- Remove mgr_id tag: this would change depending on which
mgr was active, which is certainly not desirable.
Signed-off-by: John Spray <john.spray@redhat.com>
This is useful in itself, but awkward when dealing
with logs generally, because it means that when you
grep on the name of a module, you get mostly beacon
messages rather than the log messages from the
module.
Signed-off-by: John Spray <john.spray@redhat.com>
So that modules can consume perf counter data
intelligently without having to hunt around
in C land for these constants and redefine them.
Signed-off-by: John Spray <john.spray@redhat.com>
Using PRIO_USEFUL as the threshold for what goes into
time series databases. I'm claiming that we have
more "useful" counters than fit on the screen,
so daemonperf's "a screen's worth" threshold
should be at the "interesting" level.
Signed-off-by: John Spray <john.spray@redhat.com>
Using osd=0 or similar tags was problematic because
daemons of different types have some same-named
counters (e.g. MDS and OSD both have objecter
perf counters).
Signed-off-by: John Spray <john.spray@redhat.com>
Both follow prometheus best practices. While : is a legal metric
character, "Exposed metrics should not contain colons, these are for
users to use when aggregating."
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
93f760c57c Merge pull request #40 from ivancich/wip-change-client-rec-init
824d92dd3d Merge pull request #38 from ivancich/wip-improve-next-request-return
941d1bef54 Change initialization of IndIntruHeapData to C++'s value-initialization to better future-proof the code. Since at the momeent they are scalars they'll be zero-initialized (i.e., to zero). However if they ever become something more complex, their default constructors will be called.
19153d979f Merge pull request #39 from ivancich/wip-delta-rho-plugin
a94c4e086c Allow the calculations of rho and delta to be handled by a "tracker" specified via template parameter (i.e., by static polymorphism). The tracker follows a simple interface constisting of three functions and one static function.
856a26c466 Clarify code surrounding the return value of do_next_request.
b632cfda4f Merge pull request #37 from ivancich/wip-fix-uninit-data
e6df585153 The coverity scan published in ceph-devel on 2017-09-21 revealed some uninitialized data in a constructor. This fixes that.
165a02542d Merge pull request #34 from TaewoongKim/anticipate
72e4df95cf Make anticipation_timeout configurable with config file
2f06d632d5 Add anticipation duration that keeps from resetting tag values to the current time
git-subtree-dir: src/dmclock
git-subtree-split: 93f760c57c75b9eb88382bcba29fcac3ce365e7f