Skip to content

HDDS-16181. Add container balancer recommend CLI command to suggest config for each profile - #11342

Open
sravani-revuri wants to merge 6 commits into
apache:masterfrom
sravani-revuri:HDDS-16181
Open

sravani-revuri wants to merge 6 commits into
apache:masterfrom
sravani-revuri:HDDS-16181

Conversation

@sravani-revuri

@sravani-revuri sravani-revuri commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Add ozone admin containerbalancer recommend command

The command should:

Fetch live datanode usage from SCM (via the existing getDatanodeUsageInfo RPC)
Read local Ozone configuration for global defaults (threshold, timeouts, move limits etc.)
Analyze the cluster using existing ContainerBalancerClusterAnalyzer / ContainerBalancerClusterSnapshot (HDDS-16173)
For each profile (SLOW, MEDIUM, FAST), produce:
Recommended configuration parameters with a short rationale
Time/iteration estimates by reusing ContainerBalancerAdvisor.estimateDryRun() (HDDS-16179)
Each recommended values should be validated first.
No --profile, config overrides, or interactive mode on this command
If the user wants custom inputs or refined estimates, they use dry-run instead.

But the command should allow the user to provide include/exclude datanodes and threshold values.

Example output:
RECOMMENDED CONFIGURATION (profile: SLOW)
 ══════════════════════════════════════════════════════

  Parameter                                                          Value                      Rationale
  ─────────────────────────────────────────────────────
  --threshold                                                         <value>                 <why this value>
  --max-datanodes-percentage-to-involve       <value>                 <why this value>
  --max-size-to-move-per-iteration-in-gb        <value>                 <why this value>
  --max-size-entering-target-in-gb                   <value>                  <why this value>
  --max-size-leaving-source-in-gb                   <value>                  <why this value>
  --move-timeout-minutes                                 <value>                   <why this value>
  --move-replication-timeout-minutes             <value>                    <why this value>
  --balancing-iteration-interval-minutes          <value>                    <why this value>
  --iterations                                                        <value>                    <why this value>

 ─── Estimation ─────────────────────────────────────────────

  Bytes to move:                              <cluster-derived>
  Per iteration (estimate):               <estimate>

  Estimated iterations:                    <N>(planning estimate: <M>, includes +30% buffer)

  Estimated duration:                     upper bound <N> (planning estimate: <M>, includes +30% buffer)

                                                        (assumes full move timeout + interval each cycle)

(profile: MEDIUM)
 ...

(profile: FAST)
 ...

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16181

How was this patch tested?

written test and manual test.

all profiles recommend + estimate :

bash-5.1$ ozone admin containerbalancer recommend
RECOMMENDED CONFIGURATION (profile: SLOW)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      34%            profile 10%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     10 GB          min(500 GB ceiling, max(per-iteration 252.08 MB, entering 10 GB, leaving 10 GB))
 --max-size-entering-target-in-gb           10 GB / node   profile default (10 GB)
 --max-size-leaving-source-in-gb            10 GB / node   profile default (10 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 34 -s 10 -e 10 -l 10 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

RECOMMENDED CONFIGURATION (profile: MEDIUM)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      34%            profile 20%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     26 GB          min(500 GB ceiling, max(per-iteration 252.08 MB, entering 26 GB, leaving 26 GB))
 --max-size-entering-target-in-gb           26 GB / node   profile default (26 GB)
 --max-size-leaving-source-in-gb            26 GB / node   profile default (26 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 34 -s 26 -e 26 -l 26 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

RECOMMENDED CONFIGURATION (profile: FAST)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      40%            profile default (40%)
 --max-size-to-move-per-iteration-in-gb     100 GB         min(500 GB ceiling, max(per-iteration 252.08 MB, entering 100 GB, leaving 100 GB))
 --max-size-entering-target-in-gb           100 GB / node  profile default (100 GB)
 --max-size-leaving-source-in-gb            100 GB / node  profile default (100 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 40 -s 100 -e 100 -l 100 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

bash-5.1$ ozone admin containerbalancer estimate --all
Profile: SLOW
 Based on:
   Threshold:                10.0%
   Datanode involvement:     34%
   Max entering target:      10 GB / node
   Max leaving source:       10 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: MEDIUM
 Based on:
   Threshold:                10.0%
   Datanode involvement:     34%
   Max entering target:      26 GB / node
   Max leaving source:       26 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: FAST
 Based on:
   Threshold:                10.0%
   Datanode involvement:     40%
   Max entering target:      100 GB / node
   Max leaving source:       100 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

threshold recommend + estimate

bash-5.1$ ozone admin containerbalancer recommend -t 5
RECOMMENDED CONFIGURATION (profile: SLOW)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                5.0%           user override
 --max-datanodes-percentage-to-involve      34%            profile 10%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     10 GB          min(500 GB ceiling, max(per-iteration 561.25 MB, entering 10 GB, leaving 10 GB))
 --max-size-entering-target-in-gb           10 GB / node   profile default (10 GB)
 --max-size-leaving-source-in-gb            10 GB / node   profile default (10 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 5 -i 2 -d 34 -s 10 -e 10 -l 10 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

RECOMMENDED CONFIGURATION (profile: MEDIUM)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                5.0%           user override
 --max-datanodes-percentage-to-involve      34%            profile 20%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     26 GB          min(500 GB ceiling, max(per-iteration 561.25 MB, entering 26 GB, leaving 26 GB))
 --max-size-entering-target-in-gb           26 GB / node   profile default (26 GB)
 --max-size-leaving-source-in-gb            26 GB / node   profile default (26 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 5 -i 2 -d 34 -s 26 -e 26 -l 26 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

RECOMMENDED CONFIGURATION (profile: FAST)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                5.0%           user override
 --max-datanodes-percentage-to-involve      40%            profile default (40%)
 --max-size-to-move-per-iteration-in-gb     100 GB         min(500 GB ceiling, max(per-iteration 561.25 MB, entering 100 GB, leaving 100 GB))
 --max-size-entering-target-in-gb           100 GB / node  profile default (100 GB)
 --max-size-leaving-source-in-gb            100 GB / node  profile default (100 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 5 -i 2 -d 40 -s 100 -e 100 -l 100 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50

bash-5.1$ ozone admin containerbalancer estimate --all -t 5
Profile: SLOW
 Based on:
   Threshold:                5.0%
   Datanode involvement:     34%
   Max entering target:      10 GB / node
   Max leaving source:       10 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: MEDIUM
 Based on:
   Threshold:                5.0%
   Datanode involvement:     34%
   Max entering target:      26 GB / node
   Max leaving source:       26 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: FAST
 Based on:
   Threshold:                5.0%
   Datanode involvement:     40%
   Max entering target:      100 GB / node
   Max leaving source:       100 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            561.25 MB
 Per iteration (estimate): ~561.25 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

include all matches with estimate --all

bash-5.1$ ozone admin containerbalancer recommend   --include-datanodes ozone-balancer-datanode1-1.ozone-balancer_default,ozone-balancer-datanode2-1.ozone-balancer_default,ozone-balancer-datanode3-1.ozone-balancer_default,ozone-balancer-datanode4-1.ozone-balancer_default,ozone-balancer-datanode5-1.ozone-balancer_default,ozone-balancer-datanode6-1.ozone-balancer_default
RECOMMENDED CONFIGURATION (profile: SLOW)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      34%            profile 10%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     10 GB          min(500 GB ceiling, max(per-iteration 252.08 MB, entering 10 GB, leaving 10 GB))
 --max-size-entering-target-in-gb           10 GB / node   profile default (10 GB)
 --max-size-leaving-source-in-gb            10 GB / node   profile default (10 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 34 -s 10 -e 10 -l 10 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --include-datanodes ozone-balancer-datanode1-1.ozone-balancer_default,ozone-balancer-datanode2-1.ozone-balancer_default,ozone-balancer-datanode3-1.ozone-balancer_default,ozone-balancer-datanode4-1.ozone-balancer_default,ozone-balancer-datanode5-1.ozone-balancer_default,ozone-balancer-datanode6-1.ozone-balancer_default

RECOMMENDED CONFIGURATION (profile: MEDIUM)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      34%            profile 20%, raised to 34% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     26 GB          min(500 GB ceiling, max(per-iteration 252.08 MB, entering 26 GB, leaving 26 GB))
 --max-size-entering-target-in-gb           26 GB / node   profile default (26 GB)
 --max-size-leaving-source-in-gb            26 GB / node   profile default (26 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 34 -s 26 -e 26 -l 26 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --include-datanodes ozone-balancer-datanode1-1.ozone-balancer_default,ozone-balancer-datanode2-1.ozone-balancer_default,ozone-balancer-datanode3-1.ozone-balancer_default,ozone-balancer-datanode4-1.ozone-balancer_default,ozone-balancer-datanode5-1.ozone-balancer_default,ozone-balancer-datanode6-1.ozone-balancer_default

RECOMMENDED CONFIGURATION (profile: FAST)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      40%            profile default (40%)
 --max-size-to-move-per-iteration-in-gb     100 GB         min(500 GB ceiling, max(per-iteration 252.08 MB, entering 100 GB, leaving 100 GB))
 --max-size-entering-target-in-gb           100 GB / node  profile default (100 GB)
 --max-size-leaving-source-in-gb            100 GB / node  profile default (100 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            252.08 MB
 Per iteration (estimate): ~252.08 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 40 -s 100 -e 100 -l 100 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --include-datanodes ozone-balancer-datanode1-1.ozone-balancer_default,ozone-balancer-datanode2-1.ozone-balancer_default,ozone-balancer-datanode3-1.ozone-balancer_default,ozone-balancer-datanode4-1.ozone-balancer_default,ozone-balancer-datanode5-1.ozone-balancer_default,ozone-balancer-datanode6-1.ozone-balancer_default

exclude recommend + estimate

bash-5.1$ ozone admin containerbalancer recommend   --exclude-datanodes ozone-balancer-datanode6-1.ozone-balancer_default                                                  
RECOMMENDED CONFIGURATION (profile: SLOW)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      40%            profile 10%, raised to 40% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     10 GB          min(500 GB ceiling, max(per-iteration 288.39 MB, entering 10 GB, leaving 10 GB))
 --max-size-entering-target-in-gb           10 GB / node   profile default (10 GB)
 --max-size-leaving-source-in-gb            10 GB / node   profile default (10 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 40 -s 10 -e 10 -l 10 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --exclude-datanodes ozone-balancer-datanode6-1.ozone-balancer_default

RECOMMENDED CONFIGURATION (profile: MEDIUM)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      40%            profile 20%, raised to 40% (≥2 nodes)
 --max-size-to-move-per-iteration-in-gb     26 GB          min(500 GB ceiling, max(per-iteration 288.39 MB, entering 26 GB, leaving 26 GB))
 --max-size-entering-target-in-gb           26 GB / node   profile default (26 GB)
 --max-size-leaving-source-in-gb            26 GB / node   profile default (26 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 40 -s 26 -e 26 -l 26 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --exclude-datanodes ozone-balancer-datanode6-1.ozone-balancer_default

RECOMMENDED CONFIGURATION (profile: FAST)

 Recommended parameters:
 Parameter                                  Value          Rationale
 --threshold                                10.0%          default from configuration
 --max-datanodes-percentage-to-involve      40%            profile default (40%)
 --max-size-to-move-per-iteration-in-gb     100 GB         min(500 GB ceiling, max(per-iteration 288.39 MB, entering 100 GB, leaving 100 GB))
 --max-size-entering-target-in-gb           100 GB / node  profile default (100 GB)
 --max-size-leaving-source-in-gb            100 GB / node  profile default (100 GB)
 --move-timeout-minutes                     65 min         configuration default (65 min)
 --move-replication-timeout-minutes         50 min         configuration default (50 min)
 --balancing-iteration-interval-minutes     0 min          configuration default (0 min)
 --iterations                               2              includes +30% buffer (planning estimate: 2)

 Estimation:
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

 Suggested commands:
   ozone admin containerbalancer start -t 10 -i 2 -d 40 -s 100 -e 100 -l 100 --balancing-iteration-interval-minutes 0 --move-timeout-minutes 65 --move-replication-timeout-minutes 50 --exclude-datanodes ozone-balancer-datanode6-1.ozone-balancer_default

bash-5.1$ ozone admin containerbalancer estimate --all --exclude-datanodes ozone-balancer-datanode6-1.ozone-balancer_default
Profile: SLOW
 Based on:
   Threshold:                10.0%
   Datanode involvement:     40%
   Max entering target:      10 GB / node
   Max leaving source:       10 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: MEDIUM
 Based on:
   Threshold:                10.0%
   Datanode involvement:     40%
   Max entering target:      26 GB / node
   Max leaving source:       26 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

Profile: FAST
 Based on:
   Threshold:                10.0%
   Datanode involvement:     40%
   Max entering target:      100 GB / node
   Max leaving source:       100 GB / node
   Max per iteration:        500 GB
   Move timeout:             65 min
   Balancing interval:       0 min
 Bytes to move:            288.39 MB
 Per iteration (estimate): ~288.39 MB
 Estimated iterations:     1 (planning estimate: 2, includes +30% buffer)
 Estimated duration:       upper bound ~1.1 hours (planning estimate: ~2.2 hours, includes +30% buffer)
                           (assumes full move timeout + interval each cycle)

no imabalence recommend command:

bash-5.1$ ozone admin containerbalancer recommend
Cluster is already balanced within the configured threshold. No balancing recommended.

@sravani-revuri
sravani-revuri marked this pull request as ready for review September 28, 2026 04:25
@sravani-revuri

Copy link
Copy Markdown
Contributor Author

@ashishkumar50, @rakeshadr, @sreejasahithi could you please review these changes?

@sarvekshayr sarvekshayr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sravani-revuri for working on this.

What is the difference between container balancer recommend and estimate commands? recommend also prints estimate output.

Also, resolve the merge conflicts.

@adoroszlai adoroszlai changed the title HDDS-16181. Add container balancer recommend CLI command to suggest config values for slow/medium/fast profiles HDDS-16181. Add container balancer recommend CLI command to suggest config for each profile Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants