You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Gongwenzhou (Jira)" <ji...@apache.org> on 2021/11/29 08:16:00 UTC

[jira] [Created] (KAFKA-13487) Create a topic partition directory based on the size of the directory

Gongwenzhou created KAFKA-13487:
-----------------------------------

             Summary: Create a topic partition directory based on the size of the directory
                 Key: KAFKA-13487
                 URL: https://issues.apache.org/jira/browse/KAFKA-13487
             Project: Kafka
          Issue Type: Sub-task
          Components: log
            Reporter: Gongwenzhou


In the current multi-directory scenario of `log.dirs`, logManager determines which base directory the new partition directory should be in according to the number of subdirectories in each base directory. However, in the actual production environment, the file size generated by each subject partition is different. As a result, the disk usage of the base directory is unbalanced.
We can provide a configuration to determine the strategy of logManager to create a new partition directory, as follows:
Broker-level configuration items:{*}log.directory.select.strategy{*}, there are two values: *partition* and *size*
*partition:* Sort by the number of directories under each base directory (log.dirs) (the current version of the new partition creation strategy)
*size:* Sort by the size of each directory (log.dirs), the smallest directory has the highest allocation right



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