API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary
    ACOS 6.3.0
  • Arcfra Cloud Operating System>
  • CLI command>
  • Managing cluster internal I/Os>
  • Managing data demotion and demotion policies

Managing the demotion policy

The demotion policy determines the demotion level based on the current load of the performance tier in the cluster. It dynamically adjusts the data size for demotion, the demotion parameters, and the direct-write mode of the capacity tier. The commands described in this section are used to manage the demotion policy in the cluster.

Precaution

The commands in this section are intended only for troubleshooting and for viewing the internal state of the cluster. Do not use these commands to change the cluster's default behavior unless you fully understand their impact.

Triggering demotion policy update

Procedure

Run the following command on any node in the cluster to immediately trigger a demotion policy update:

zbs-meta sink scan_immediate

Output note

If the command succeeds, no output is displayed.

Configuring demotion policy parameters

The demotion policy includes four levels. The system dynamically adjusts based on the current load of the performance tier:

  • SINK_LOW: Low level
  • SINK_MID: Medium level
  • SINK_HIGH: High Level
  • SINK_VERY_HIGH: Very high level

There are four direct-write modes for the capacity tier, applicable only to volumes with a redundancy policy of replication.

  • CAP_DIO_DISABLED: Disables direct write to the capacity tier.
  • CAP_DIO_BLOCK_ALIGNED_ONLY: Performs direct writes only for 256 KiB-aligned I/Os.
  • CAP_DIO_ALL_THROTTLED: Performs direct writes to the capacity tier for I/Os throttled by the performance tier, same as CAP_DIO_BLOCK_ALIGNED_ONLY.
  • CAP_DIO_ALL: Performs direct writes only for 8 KiB-aligned I/Os.

Procedure

Run the following command on any node in the cluster to configure demotion policy parameters:

zbs-meta sink update [--inactive_lease_interval_map <INACTIVE_LEASE_INTERVAL_MAP>] [--no_lease_timeout_map <NO_LEASE_TIMEOUT_MAP>] [--cap_direct_write_policy_map <CAP_DIRECT_WRITE_POLICY_MAP>] [--prefer_cap_passthru <PREFER_CAP_PASSTHRU>]

ParameterDescription
--inactive_lease_interval_map <INACTIVE_LEASE_INTERVAL_MAP>Optional. Specifies the time threshold for determining whether the lease is active under different demotion policy levels.
--no_lease_timeout_map <NO_LEASE_TIMEOUT_MAP>Optional. Specifies the time threshold for issuing demotion commands to extents without a lease under different demotion policy levels.
--cap_direct_write_policy_map <CAP_DIRECT_WRITE_POLICY_MAP>Optional. Specifies the capacity tier direct write policies corresponding to different demotion policy levels.
--prefer_cap_passthru <PREFER_CAP_PASSTHRU>Optional. Specifies if a write I/O with the PREFER_CAP IO flag should directly write to the capacity tier when the conditions are met.

Output note

If the command succeeds, no output is displayed.

Querying demotion policy parameters

Procedure

Run the following command on any node in the cluster to query demotion policy parameters:

zbs-meta sink show

Output example

Sink scan interval: 10s
Sink mode:  SINK_LOW
Sink load: 0.42
Sink mid load ratio: 0.50
Sink high load ratio: 0.80
Sink very high load ratio: 0.95
Drain parent start mode:  SINK_LOW
Drain idle start mode:  SINK_MID
Cap direct write policy:  CAP_DIO_BLOCK_ALIGNED_ONLY
Start cap direct write in SINK_LOW ratio: 0.40
Prefer cap passthru:  False
Access reserve block num: reserve all
Inactive lease interval (sec) map:  (SINK_MID, 1800), (SINK_HIGH, 900), (SINK_VERY_HIGH, 180)
No lease timeout (ms) map:  (SINK_LOW, 600000), (SINK_MID, 600000), (SINK_HIGH, 300000), (SINK_VERY_HIGH, 180000)
Cap direct write policy map:  (SINK_LOW, CAP_DIO_DISABLED), (SINK_MID, CAP_DIO_BLOCK_ALIGNED_ONLY), (SINK_HIGH, CAP_DIO_ALL_THROTTLED), (SINK_VERY_HIGH, CAP_DIO_ALL)

Output note

ParameterDescription
Sink scan intervalThe interval for updating the demotion policy.
Sink modeThe demotion policy level.
Sink loadThe current performance tier load, used to determine the current demotion policy level.
Sink mid load ratioWhen the performance tier load exceeds this value, the cluster enters the medium demotion policy level.
Sink high load ratioWhen the performance tier load exceeds this value, the cluster enters the high demotion policy level.
Sink very high load ratioWhen the performance tier load exceeds this value, the cluster enters the very high demotion policy level.
Drain parent start modeThe demotion level at which demotion commands start to be issued for parent extents.
Drain idle start modeThe demotion level at which demotion commands start to be issued for extents without leases.
Cap direct write policyThe current direct-write policy for the capacity tier.
Start cap direct write in SINK_LOW ratioWhen the current demotion level is low and Sink load exceeds this value, the parameter enables capacity-tier direct write.
Prefer cap passthruWhether a write I/O with the PREFER_CAP IO flag should directly write to the capacity tier when the conditions are met.
Access reserve block numThe number of blocks currently reserved by Access.
Inactive lease interval (sec) mapThe time thresholds for determining whether a lease is active under different demotion policy levels.
No lease timeout (ms) mapThe time thresholds for issuing demotion commands to extents without a lease under different demotion policy levels.
Cap direct write policy mapThe capacity tier direct write policies corresponding to different demotion policy levels.