-
Notifications
You must be signed in to change notification settings - Fork 22
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
CNDB-8187 Add metrics about time spent writing SAI (compaction and flush) #1329
base: main
Are you sure you want to change the base?
Conversation
…nd flush) and support tracking SAI build time
There is still one problem on Compactors: we use StorageAttachedIndexWriter.addRow() even when rebuilding the indexes, we have to disambiguate this case from the other two cases (memtable flush and compaction activities) otherwise it is not possible to correlate correctly |
Quality Gate passedIssues Measures |
src/java/org/apache/cassandra/index/sai/StorageAttachedIndexBuilder.java
Show resolved
Hide resolved
src/java/org/apache/cassandra/index/sai/disk/StorageAttachedIndexWriter.java
Outdated
Show resolved
Hide resolved
public final Histogram storageAttachedIndexWritingTimeForOther; | ||
|
||
/** Time spent writing memtables during compaction */ | ||
public final Histogram compactionTime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CNDB has CompactionTaskMetrics#duration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's another thing, I initially thought I had to go there, but these metrics are more low level
CompactionTaskMetrics#duration is more about the overall "task", including etcd and other stuff.
I want this metric because it is comparable with the other storageAttachedIndexWritingTimeForCompaction
New Table and Keyspace metrics:
storageAttachedIndexWritingTimeForXX
is the time spent in "StorageAttachedIndexWriter#addRow" for operation type XXXFor MemTable flush:
storageAttachedIndexWritingTimeForFlush
is always smaller thanflushTime
For Compaction:
compactionTime
is the total timestorageAttachedIndexWritingTimeForCompaction
is always smaller thancompactionTime
For IndexBuild:
storageAttachedIndexRebuildTime
is the total timestorageAttachedIndexWritingTimeForIndexBuild
is always smaller thanstorageAttachedIndexRebuildTime
storageAttachedIndexWritingTimeForOther is for anything else (Garbage Collection, Scrub....)