cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.15k stars 3.81k forks source link

storage: improve block load metrics #125075

Open RaduBerinde opened 5 months ago

RaduBerinde commented 5 months ago

We currently have these two metrics:

    metaBlockBytes = metric.Metadata{
        Name:        "storage.iterator.block-load.bytes",
        Help:        "Bytes loaded by storage engine iterators (possibly cached). See storage.AggregatedIteratorStats for details.",
        Measurement: "Bytes",
        Unit:        metric.Unit_BYTES,
    }
    metaBlockBytesInCache = metric.Metadata{
        Name:        "storage.iterator.block-load.cached-bytes",
        Help:        "Bytes loaded by storage engine iterators from the block cache. See storage.AggregatedIteratorStats for details.",
        Measurement: "Bytes",
        Unit:        metric.Unit_BYTES,
    }

In practice, the most likely figure we would be interested in is the difference between these two, i.e. how many bytes we read. We should replace the total value with the non-cached value.

Jira issue: CRDB-39220

blathers-crl[bot] commented 5 months ago

Hi @RaduBerinde, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.