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

Andres de la Peña commented on CASSANDRA-17150:
-----------------------------------------------

Yep, the calculations for the particular case of multiple data directories 
located on the same partition were wrong. I think they worked if 
{{data_disk_usage_max_disk_size}} isn't enabled and we only use 
ratios/percentages, because in that case everything is counted multiple times 
so the proportions remain the same. But if we use 
{{data_disk_usage_max_disk_size}} that total value will be compared against 
wrongly high usage numbers.

In the end, the only thing that we consider in our calculations is the capacity 
and used space of the partitions that contain data directories. The contents of 
the data directories themselves are irrelevant, and we only care about the 
usage of the partitions holding them. So I have changed the disk usage 
calculation to only use one arbitrary-selected data directory per different 
{{{}FileStore{}}}. I think that should cover the case of multiple data 
directories per partition.

As for the cases where the commitlog, the OS or any other non-Cassandra stuff 
is taking space in the partitions where the data directories are located, I 
think we should include them in the computation and not try to make 
differences. After all, what we want is to know how much available space is 
left, and if any extraneous data grows too much it is going to left the data 
directories without space.

> Guardrails for disk usage
> -------------------------
>
>                 Key: CASSANDRA-17150
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17150
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Feature/Guardrails
>            Reporter: Andres de la Peña
>            Assignee: Andres de la Peña
>            Priority: Normal
>             Fix For: 4.x
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Add guardrails for disk usage establishing soft/hard limits on the percentage 
> of used disk space. For example:
> {code}
> # Warning threshold to warn when local disk usage exceeds threshold. Valid 
> values: (1, 100]
> # Defaults to -1 to disable.
> # disk_usage_percentage_warn_threshold: -1
> # Failure threshold to reject write requests if replica disk usage exceeds 
> threshold. Valid values: (1, 100]
> # Defaults to -1 to disable.
> # disk_usage_percentage_failure_threshold: -1
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to