You need to enable JavaScript to run this app.
Message Queue for Kafka

Message Queue for Kafka

Copy page
Download PDF
Instance operation
Set disk cleanup threshold
Copy page
Download PDF
Set disk cleanup threshold
When the disk usage of a Kafka instance exceeds the preset disk cleanup threshold, the backend service automatically deletes old messages until the disk level recovers. This topic describes how to modify the disk cleanup threshold.​
Background information​
For each broker in a Kafka instance, the disk cleanup threshold is the same If the overall disk usage of the Kafka instance reaches the disk cleanup threshold, or if uneven data distribution causes a broker's disk usage to reach the threshold, some historical messages on that node will be deleted in chronological order, regardless of the message retention period, until the disk level recovers. This prevents abnormal Kafka instance operation caused by excessive disk usage and avoids replica inconsistency caused by nodes being unable to synchronize data.​
The default disk cleanup threshold for Kafka instances is set to 90%. You can also set the disk cleanup threshold yourself on the instance management page. The supported range is 70% to 90%.​
tip​
  • If the current disk usage of the instance already exceeds the new threshold, lowering the disk cleanup threshold may trigger automatic cleanup of data that exceeds the threshold. Please proceed with caution.​
  • We recommend that you set up alarm monitoring for the broker's disk capacity threshold. It helps to address issues before disk usage approaches the cleanup threshold and to prevent message deletion before natural aging. For recommended alarm strategy settings, refer to the instance disk usage exceeding 30% and disk skewness exceeding 30%.​
  • Kafka version 3.7.1 does not support setting disk cleanup threshold feature for now.​
Operation steps​
  1. Select the region where the instance is located in the top menu bar.​
  1. On the Instances page, click the specified instance name.​
  1. In the Instance details tab in the Instance configuration section, locate the Disk cleanup level.​
  1. Click the corresponding edit icon and reset the disk cleanup threshold.​
  1. Click OK.​
​
Last updated: 2026.06.08 15:09:59