[ https://issues.apache.org/jira/browse/CASSANDRA-18283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695309#comment-17695309 ]
Stefan Miklosovic edited comment on CASSANDRA-18283 at 3/1/23 8:19 PM: ----------------------------------------------------------------------- sure {code:java} $ ./bin/nodetool tablestats ks Total number of tables: 46 ---------------- Keyspace : ks Read Count: 0 Read Latency: NaN ms Write Count: 0 Write Latency: NaN ms Pending Flushes: 0 Table: tb SSTable count: 1 Old SSTable count: 0 >>>>> added Max SSTable size: 5.057KiB Space used (live): 5178 Space used (total): 5178 Space used by snapshots (total): 5026 Off heap memory used (total): 200 SSTable Compression Ratio: 1.826086956521739 Number of partitions (estimate): 1 Memtable cell count: 0 Memtable data size: 0 Memtable off heap memory used: 0 Memtable switch count: 0 Local read count: 0 Local read latency: NaN ms Local write count: 0 Local write latency: NaN ms >>>>> added Local read/write ratio: 0.00000 Pending flushes: 0 Percent repaired: 0.0 Bytes repaired: 0.000KiB Bytes unrepaired: 0.022KiB Bytes pending repair: 0.000KiB Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used: 176 Bloom filter off heap memory used: 168 Index summary off heap memory used: 16 Compression metadata off heap memory used: 16 Compacted partition minimum bytes: 21 Compacted partition maximum bytes: 24 Compacted partition mean bytes: 24 Average live cells per slice (last five minutes): NaN Maximum live cells per slice (last five minutes): 0 Average tombstones per slice (last five minutes): NaN Maximum tombstones per slice (last five minutes): 0 Dropped Mutations: 0 Droppable tombstone ratio: 0.00000 Table: tb2 SSTable count: 3 Old SSTable count: 0 Max SSTable size: 5.149KiB >>>>> addded SSTables Time Window: 1 MINUTES, max duration: 22 seconds Space used (live): 15769 Space used (total): 15769 Space used by snapshots (total): 15317 Off heap memory used (total): 600 SSTable Compression Ratio: 0.7217125382262997 Number of partitions (estimate): 12 Memtable cell count: 0 Memtable data size: 0 Memtable off heap memory used: 0 Memtable switch count: 0 Local read count: 0 Local read latency: NaN ms Local write count: 0 Local write latency: NaN ms Local read/write ratio: 0.00000 Pending flushes: 0 Percent repaired: 0.0 Bytes repaired: 0.000KiB Bytes unrepaired: 0.319KiB Bytes pending repair: 0.000KiB Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used: 528 Bloom filter off heap memory used: 504 Index summary off heap memory used: 48 Compression metadata off heap memory used: 48 Compacted partition minimum bytes: 21 Compacted partition maximum bytes: 29 Compacted partition mean bytes: 28 Average live cells per slice (last five minutes): NaN Maximum live cells per slice (last five minutes): 0 Average tombstones per slice (last five minutes): NaN Maximum tombstones per slice (last five minutes): 0 Dropped Mutations: 0 Droppable tombstone ratio: 0.00000 {code} twcs stuff is added only on twcs tables, ratio is 0 if no local reads / write are done (I just started cassandra locally and did nodetool tablestats), max sstable size is always there {code} cqlsh> DESCRIBE ks.tb2 ; CREATE TABLE ks.tb2 ( id int PRIMARY KEY ) WITH additional_write_policy = '99p' AND allow_auto_snapshot = true AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND cdc = false AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'MINUTES', 'enabled': 'true', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND memtable = 'default' AND crc_check_chance = 1.0 AND default_time_to_live = 0 AND extensions = {} AND gc_grace_seconds = 864000 AND incremental_backups = true AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair = 'BLOCKING' AND speculative_retry = '99p'; {code} was (Author: smiklosovic): sure {code:java} $ ./bin/nodetool tablestats ks Total number of tables: 46 ---------------- Keyspace : ks Read Count: 0 Read Latency: NaN ms Write Count: 0 Write Latency: NaN ms Pending Flushes: 0 Table: tb SSTable count: 1 Old SSTable count: 0 >>>>> added Max SSTable size: 5.057KiB Space used (live): 5178 Space used (total): 5178 Space used by snapshots (total): 5026 Off heap memory used (total): 200 SSTable Compression Ratio: 1.826086956521739 Number of partitions (estimate): 1 Memtable cell count: 0 Memtable data size: 0 Memtable off heap memory used: 0 Memtable switch count: 0 Local read count: 0 Local read latency: NaN ms Local write count: 0 Local write latency: NaN ms >>>>> added Local read/write ratio: 0.00000 Pending flushes: 0 Percent repaired: 0.0 Bytes repaired: 0.000KiB Bytes unrepaired: 0.022KiB Bytes pending repair: 0.000KiB Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used: 176 Bloom filter off heap memory used: 168 Index summary off heap memory used: 16 Compression metadata off heap memory used: 16 Compacted partition minimum bytes: 21 Compacted partition maximum bytes: 24 Compacted partition mean bytes: 24 Average live cells per slice (last five minutes): NaN Maximum live cells per slice (last five minutes): 0 Average tombstones per slice (last five minutes): NaN Maximum tombstones per slice (last five minutes): 0 Dropped Mutations: 0 Droppable tombstone ratio: 0.00000 Table: tb2 SSTable count: 3 Old SSTable count: 0 Max SSTable size: 5.149KiB >>>>> addded SSTables Time Window: 1 MINUTES, max duration: 22 seconds Space used (live): 15769 Space used (total): 15769 Space used by snapshots (total): 15317 Off heap memory used (total): 600 SSTable Compression Ratio: 0.7217125382262997 Number of partitions (estimate): 12 Memtable cell count: 0 Memtable data size: 0 Memtable off heap memory used: 0 Memtable switch count: 0 Local read count: 0 Local read latency: NaN ms Local write count: 0 Local write latency: NaN ms Local read/write ratio: 0.00000 Pending flushes: 0 Percent repaired: 0.0 Bytes repaired: 0.000KiB Bytes unrepaired: 0.319KiB Bytes pending repair: 0.000KiB Bloom filter false positives: 0 Bloom filter false ratio: 0.00000 Bloom filter space used: 528 Bloom filter off heap memory used: 504 Index summary off heap memory used: 48 Compression metadata off heap memory used: 48 Compacted partition minimum bytes: 21 Compacted partition maximum bytes: 29 Compacted partition mean bytes: 28 Average live cells per slice (last five minutes): NaN Maximum live cells per slice (last five minutes): 0 Average tombstones per slice (last five minutes): NaN Maximum tombstones per slice (last five minutes): 0 Dropped Mutations: 0 Droppable tombstone ratio: 0.00000 {code} twcs stuff is added only on twcs tables, ratio is 0 if no local reads / write are done (I just started cassandra locally and did nodetool tablestats), max sstable size is always there > Enhance diagnostic nodetool tablestats output > --------------------------------------------- > > Key: CASSANDRA-18283 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18283 > Project: Cassandra > Issue Type: Improvement > Components: Tool/nodetool > Reporter: Brad Schoening > Assignee: Stefan Miklosovic > Priority: Normal > Fix For: 4.x > > Attachments: image-2023-02-28-08-08-24-727.png > > Time Spent: 20m > Remaining Estimate: 0h > > The nodetool tablestats command lacks some available details which would be > very useful to report upon. This is especially helpful in > database-as-a-service environments where servers and their disk files are not > directly observable by users. > 1. Currently, for LCS tablestats reports useful details about the number of > sstables in each level: > SSTable count: 6635 > SSTables in each level: [1, 9, 98, 805, 5722, 0, 0, 0, 0] > This type of additional detail about the sstables is absent from STCS and > TWCS as it only reports the table count. > 1a) For STCS, tablestats should report the max sstable file size on disk. > This is useful to know if compaction has failed due to disk space or if a > forced compaction created a jumbo table. > 1b) For TWCS, tablestats should report the min & max timestamp, and duration > of the sstables representing windows. This is useful to know if > out-of-window writes or rows w/out a TTL have lead many more sstables on disk > than expected by the time window configuration. > STCs example: > SSTable count: 6635 > SSTable STCS max size: 122,000,000,000 > STCs example: > SSTable count: 6635 > SSTables Time Window 15 DAYS, max duration : 362d 7h 16m 49s > 2. While tablestats reports both memtable and disk file sstable statistics. > It is useful these are in the same command, but it would clarify the output > to separate mem vs disk into two sections > i.e., > -- File statistics > SSTable count: 6635 > SSTables in each level: [1, 9, 98, 805, 5722, 0, 0, 0, 0] > -- Memtable statistics > Bloom filter false positives: 12184123 > Bloom filter false ratio: 0.07203 > Bloom filter space used: 16874424 > Bloom filter off heap memory used: 16821344 > Index summary off heap memory used: 7525546 > Space used (live): 1324067896238 > 3. Read / Write count should also be reported as a ratio, such as: > Local read count: 202961459 > Local write count: 40554481 > Local read/write ratio: 5:1 <new> > Local read latency: 1.957 ms > Local write count: 40554481 > Local write latency: 0.040 ms -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org