Enhancement #77226
closedPerformance counters for ObjectStore interface
0%
Description
Most of BlueStore functions that implement Objectstore are covered by performance counters.
For example, `BlueStore::read()` has "read_lat" performance counter.
Also, transactions processing (`_txc_add_transaction`) have some of its ops tracked; for example `BlueStore::_do_write()` has "write_lat" .
Not all functions are covered.
Examples:
`BlueStore::get_attr` is not measured.
Transaction OP_CLONE: `BlueStore::_clone()` is not measured.
Task:
Cover all interface functions with performance counters.
It is OK to group similar functions together: get_attr+get_attrs, set_attr+set_attrs+rm_attr+rm_attrs.
Do not hesitate to create "other" categories for infrequent calls.
EL Updated by Emily Leson 6 months ago
Note: I'm working on this
EL Updated by Emily Leson 6 months ago
- Assignee set to Emily Leson
EL Updated by Emily Leson 5 months ago · Edited
Approach (matching read_lat / write_lat examples): public read methods each get an add_time_avg counter fired via log_latency; transaction ops fire from their handler (clone, _setattr, …) via log_latency_fn with cid/oid context, same style as the existing truncate/remove. I instrument at the handler level rather than the deeper _do* workers, since some workers are shared (e.g. _do_truncate serves both _truncate and _remove) which I alr verified there's no double-counting.
Current coverage: all read methods (exists, stat, getattr/getattrs, fiemap, omap_get/omap_get_header/omap_check_keys) and all Transaction::OP_* handlers (touch, zero, attrs, omap writes, clone/clone_range, rename, collection ops).
Groupings:
- attr_lat: setattr/setattrs/rmattr/rmattrs
- omap_set_lat: omap setkeys/setheader/rmkeys/rmkey_range
- collection_lat: the read-side collection queries (list/exists/empty/bits)
- other_write_lat: rare write ops (set_alloc_hint, set_collection_opts, collection create/remove/split/merge)
Questions:
1. Do you have a specific list of functions you want covered, or is "all interface ops with sensible grouping" the intent? Want to make sure I didn't miss any you care about.
2. Are the groupings above what you had in mind? Especially splitting read-side (collection_lat) from write-side (other_lat) "other" buckets? Happy to merge or split differently.
3. Should trivial accessors (collection_bits, collection_exists) be measured, or left out as too cheap to matter?
Already verified with a vstart cluster (perf dump showing the new counters incrementing on real I/O) plus the objectstore unit tests.
AK Updated by Adam Kupczyk 5 months ago
1. "all interface ops with sensible grouping" is exactly the intent.
2. Read must not go together with Write. They have different latency profiles and mixing them would (I assume) reduce clarity.
3. They are too cheap to matter. But if are infrequent, why not cover with "other"?
EL Updated by Emily Leson 5 months ago
Applied feedback ✓
Progress
Scope: latency only (add_time_avg via log_latency, matching read_lat/write_lat). Ops that warrant count/byte counters already have them.
Curently read methods fire log_latency at each exit (two sites only where an inner return skips the common exit; e.g. stat, _fiemap); transaction ops fire from the handler via log_latency_fn with lazy cid/oid context. Instrumented at the handler level, not the shared _do* workers, to avoid double-counting which is the same reason collection_empty carries no counter (it delegates to collection_list, already measured).
EL Updated by Emily Leson 5 months ago
- Pull request ID set to 69890
UB Updated by Upkeep Bot 2 months ago
- Status changed from New to Resolved
- Merge Commit set to 43849ecd7f9accc91bcdfd5158636d077a58973e
- Fixed In set to v21.3.0-3775-g43849ecd7f
- Upkeep Timestamp set to 2026-09-29T14:07:54+00:00