You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "N L (Jira)" <ji...@apache.org> on 2026/01/08 22:04:00 UTC

[jira] [Comment Edited] (CASSANDRA-21073) Make "active compaction remaining time" reported by nodetool compactionstats more accurate

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

N  L  edited comment on CASSANDRA-21073 at 1/8/26 10:03 PM:
------------------------------------------------------------

* Branch URL: [https://github.com/phanirajl/cassandra/tree/phanirajl/CASSANDRA-21073/trunk]

 * Compare view: [https://github.com/phanirajl/cassandra/compare/trunk...phanirajl/CASSANDRA-21073/trunk]

 * JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-21073
[~dnk] 


was (Author: phanirajl):
* Branch URL: https://github.com/phanirajl/cassandra/tree/phanirajl/CASSANDRA-21073/trunk

 * Compare view: https://github.com/phanirajl/cassandra/compare/trunk...phanirajl/CASSANDRA-21073/trunk

 * JIRA issue: https://issues.apache.org/jira/browse/CASSANDRA-21073

> Make "active compaction remaining time" reported by nodetool compactionstats more accurate
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21073
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21073
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Compaction, Tool/nodetool
>            Reporter: Dmitry Konstantinov
>            Priority: Normal
>
> Currently "active compaction remaining time" is calculated as
> {code:java}
> (total - completed) / compaction_throughput{code}
> the real processing speed can be much lower that compaction_throughput configuration limit, so the value can be highly inaccurate. 
> We can use some realtime information (rate or the time since a start of a compaction) to make the reported value more accurate.
> Option 1: 
> {code:java}
>  (total - completed) / current compaction throughput (1 minute){code}
> Option 2: add compaction start time or time since start to CompactionStats
> {code:java}
>  (total - completed) / (completed / time since compaction start){code}
>  
> An example of the current reporting, I set compaction_throughput to 1024MiB (just as an example) but in reality a similar picture can be:
> {code:java}
> ./bin/nodetool compactionstats -H
> concurrent compactors                     1                                                                       
> pending tasks                             2                                                                       
> stress                                    stress_table    2                                                       
> compactions completed                     10                                                                      
> data compacted                            14.82 GiB                                                               
> compactions aborted                       0                                                                       
> compactions reduced                       0                                                                       
> sstables dropped from compaction          0                                                                       
> 15 minute rate                            24.88/minute                                                            
> mean rate                                 100.63/hour                                                             
> compaction throughput (MiB/s)             1024.0                                                                  
> current compaction throughput (1 minute)  47.052 MiB/s                                                            
> current compaction throughput (5 minute)  25.934 MiB/s                                                            
> current compaction throughput (15 minute) 10.843 MiB/s                                                            
> id                                        compaction type keyspace table        completed  total    unit  progress
> c3b5c9d0-d6b9-11f0-b467-b1b09c3e4b2e      Compaction      stress   stress_table 288.84 MiB 1.36 GiB bytes 20.74% 
> active compaction remaining time          0h00m01s      {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org