You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Siddhant Sangwan (Jira)" <ji...@apache.org> on 2021/09/08 08:09:00 UTC

[jira] [Created] (HDDS-5728) ContainerBalancer should use remaining space to calculate utilization.

Siddhant Sangwan created HDDS-5728:
--------------------------------------

             Summary: ContainerBalancer should use remaining space to calculate utilization.
                 Key: HDDS-5728
                 URL: https://issues.apache.org/jira/browse/HDDS-5728
             Project: Apache Ozone
          Issue Type: Sub-task
          Components: SCM
            Reporter: Siddhant Sangwan
            Assignee: Siddhant Sangwan


ContainerBalancer gets a list of datanodes sorted according to their utilizations using NodeManager#getMostOrLeastUsedDatanodes.

There are two ways of calculating utilization:
 # {{used space / capacity}}
 # {{(capacity - remaining) / capacity}}

{{Used}} space is obtained using the DU or DF command (SpaceUsageSource), while {{remaining}} can either be {{capacity - used}} or calculated using the java.io.File#getUsableSpace method. This means the two ways of calculating utilization might give different results (when {{used}} is not equal to {{capacity - remaining}}).

Currently, NodeManager#getMostOrLeastUsed uses method 2 while balancer uses method 1.
 Instead, both should consistently use the same approach. We prefer method 2 since the {{remaining}} space calculation will also account for space used by processes other than Ozone. See the documentation in VolumeInfo for further details on calculating {{remaining}} space.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org