You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
db: add ability to collect a profile of value retrievals
With the introduction of value separation, retrievals of separated values are
more expensive than retrievals of inlined values. Pebble exports an aggregate
metric recording the total count of value retrievals that must load a value
from an external blob file. This can be used to help attribute performance
issues to excessive separated value retrievals, but it doesn't help with
understanding what codepaths are performing the retrievals.
This commit adds support for collection of a 'separated value retrieval'
profile, aggregating the count and byte-total of value retrievals per unique
stack trace while profile collection is active. This additional instrumentation
adds some overhead and is too expensive to perform by default.
Users may call DB.RecordSeparatedValueRetrievals to initiate collection of a
profile. All subsequent opened iterators and compactions will record retrievals
of separated values into the profile until the caller stops the collection with
the invocation of a callback.
For now this profile can only be dumped to a text format through a String
method. We could export it to a pprof file but it would require a fair bit of
work.
Close#5535.
Informs cockroachdb/cockroach#144715.
0 commit comments