[ 
https://issues.apache.org/jira/browse/CASSANDRA-18283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17695685#comment-17695685
 ] 

Stefan Miklosovic edited comment on CASSANDRA-18283 at 3/2/23 12:17 PM:
------------------------------------------------------------------------

Ok. I also noticed some minor rendering issues when a keyspace does not have 
any tables. Currently, it writes something like this:
{code:java}
Total number of tables: 0
---------
---------
{code}
I would prefer that there is no output at all when "tablestats ks" is executed 
on "ks" keyspace not having any tables.

There is also redundant space in the output like this:
{code:java}
Keyspace : ks
{code}
It should be just
{code:java}
Keyspace: ks
{code}
This is the only case where we put space before a colon.

All fixes are gathered in this commit: 
[https://github.com/apache/cassandra/pull/2176/commits/cb536a27ea490a85ceaaf2572877bd9c36302006]

I am building it as we speak.


was (Author: smiklosovic):
Ok. I also noticed some minor rendering issues when a keyspace does not have 
any tables. Currently, it write something like this:

{code}
Total number of tables: 0
---------
---------
{code}

I would prefer if there is no output at all when "tablestats ks" is executed on 
"ks" keyspace not having any tables.

There is also redundant space in the output like this:

{code}
Keyspace : ks
{code}

It should be just

{code}
Keyspace:  ks
{code}

This is the only case where we put space before a colon.

All fixes are gathered in this commit: 
https://github.com/apache/cassandra/pull/2176/commits/cb536a27ea490a85ceaaf2572877bd9c36302006

I am building it as we speak.

> 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

Reply via email to