Metadata load balancing method , apparatus and device, and non-volatile readable storage medium
By obtaining the metadata service load pressure information and migration parameters of the distributed file storage cluster, the metadata migration time and target service are accurately determined, which solves the problem of unnecessary metadata migration in the existing technology and improves the stability of the distributed storage system. sex and performance.
Patent Information
- Application Number
- PCT/CN2024/076962
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-24
- Filing Date
- 2024-02-08
- Publication Date
- 2024-08-29
AI Technical Summary
Existing metadata load balancing methods have low recognition of business load characteristics, resulting in unnecessary and ineffective metadata migration, resulting in poor performance of the distributed file system.
By obtaining the load pressure information of each metadata service in the distributed file storage cluster, the metadata migration time and target service are determined, and the export and import subtree partitions are determined according to the migration parameters to achieve accurate metadata migration.
It improves the metadata load balancing characteristics, reduces the probability of unnecessary migration, improves the stability and metadata throughput of the distributed storage system, and improves the performance bottleneck of metadata-intensive file systems.
Smart Images

Figure CN2024076962_29082024_PF_FP_ABST
Abstract
Description
Metadata load balancing method, device, equipment and non-volatile readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on February 24, 2023, with application number 202310161610.9 and application name “A metadata load balancing method, device, equipment and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of distributed storage technology, and in particular, to a metadata load balancing method, apparatus, device, and non-volatile readable storage medium. Background Art
[0004] Distributed file storage systems have been widely adopted in many key areas, including big data computing. In these systems, metadata is managed separately from data. This decoupling approach supports the independence of metadata and data, using different non-volatile, readable storage media. For example, NvmeSSDs (NVM Express Solid State Disks) are used to store metadata, while HDDs (Hard Disk Drives) are used to store data. In this architecture, metadata must be retrieved before actual data access. Recent research has shown that many file system workloads are metadata-intensive, with over 60% of file system operations focused on metadata. Furthermore, the vast majority of files are small, with a high byte-level load, resulting in uneven metadata request pressure. This intensive metadata access is a significant bottleneck in file system service performance. All of these trends make metadata load balancing crucial.
[0005] In order to improve the performance of metadata access in massive distributed file systems, it is challenging to expand and improve the performance of distributed MDS (Metadata Server) clusters. The challenge is mainly because metadata contains file system structural information and exhibits a higher degree of interdependence. Under current technology, the dynamic subtree partitioning method is usually used to decompose the file system directory into several subdirectories, and then dynamically adjust them according to the file access popularity. Dynamic adjustment refers to migration between multiple metadata services. This method improves metadata expansion characteristics by distributing subtrees among multiple metadata services through splitting and hierarchical namespaces. However, this method has serious imbalance problems, and the distributed metadata service is unbalanced and the prediction is inaccurate. The reason is that this method has low recognition of business load characteristics, which easily leads to unnecessary and invalid migration of metadata, resulting in poor performance of the distributed file system.
[0006] Regarding the related technologies, metadata load balancing methods have low recognition of business load characteristics, which easily leads to unnecessary and invalid migration of metadata, resulting in poor performance of distributed file systems. No effective solution has yet been proposed.
[0007] Summary of the Invention
[0008] The purpose of this application is to provide a metadata load balancing method, which improves the recognition of business load characteristics, greatly reduces the probability of unnecessary and invalid migration of metadata, has good metadata load balancing characteristics, and improves the stability of the distributed storage system; another purpose of this application is to provide a metadata load balancing device, equipment and computer non-volatile readable storage medium.
[0009] To solve the above technical problems, according to a first aspect, the present application provides a metadata load balancing method, comprising:
[0010] Obtain metadata load pressure information corresponding to each metadata service in the distributed file storage cluster;
[0011] Determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services based on metadata load pressure information;
[0012] Obtain the migration parameters corresponding to each subtree partition in each target metadata service;
[0013] Determine the export subtree partition and the import subtree partition according to each migration parameter;
[0014] When the metadata migration time is reached, the metadata of the metadata quantity to be migrated is migrated from the export subtree partition to the import subtree partition.
[0015] In an optional implementation of the present application, obtaining metadata load pressure information corresponding to each metadata service in the distributed file storage cluster includes:
[0016] The metadata load pressure information corresponding to each metadata service is obtained through the load monitor deployed on each metadata service in the distributed file storage cluster.
[0017] In an optional embodiment of the present application, determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load pressure information includes:
[0018] By setting a metadata migration startup program in a pre-selected metadata service, the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined according to the metadata load pressure information.
[0019] In an optional implementation of the present application, obtaining migration parameters corresponding to each subtree partition in each target metadata service includes:
[0020] Obtain the migration parameters corresponding to each subtree partition in each target metadata service through the load analysis component deployed in each metadata service;
[0021] Determine the export subtree partition and import subtree partition based on the migration parameters, including:
[0022] The subtree selection component deployed in each metadata service determines the export subtree partition and the import subtree partition according to each migration parameter.
[0023] In an optional implementation of the present application, the migration parameters corresponding to each subtree partition in each target metadata service are obtained by a load analysis component deployed in each metadata service, including:
[0024] The load analysis component deployed in each metadata service obtains the migration parameters corresponding to each subtree partition in each target metadata service and the workload I / O pattern of the distributed file storage cluster;
[0025] The subtree selection component deployed in each metadata service determines the export subtree partition and import subtree partition based on the migration parameters, including:
[0026] When it is determined that the workload I / O mode is metadata-intensive IO, the subtree selection component deployed in each metadata service determines the export subtree partition and the import subtree partition according to each migration parameter.
[0027] In an optional implementation of the present application, the migration parameters corresponding to each subtree partition in each target metadata service are obtained by a load analysis component deployed in each metadata service, including:
[0028] Use the load analysis component deployed in each metadata service to count the historical workload corresponding to each subtree partition;
[0029] Determine metadata access differences for each subtree partition based on each historical workload;
[0030] The migration parameters corresponding to each subtree partition are determined according to the metadata access differences.
[0031] In an optional implementation of the present application, determining migration parameters corresponding to each subtree partition according to metadata access differences includes:
[0032] Get the preset maximum metadata throughput;
[0033] When it is determined that there is a historical workload greater than the maximum metadata throughput, migration parameters corresponding to each subtree partition are determined according to the metadata access difference.
[0034] In an optional implementation manner of the present application, after determining the derived subtree partition and the imported subtree partition according to each migration parameter, the method further includes:
[0035] When there is a historical metadata access request table reflecting spatial locality in the historical metadata access request table maintained in each metadata service, a target subtree partition is selected from the subtree partitions at the same level as the derived subtree partition;
[0036] Increase the migration parameters of the target subtree partition to the preset values.
[0037] In an optional implementation of the present application, obtaining metadata load pressure information corresponding to each metadata service in the distributed file storage cluster includes:
[0038] Get the number of metadata requests processed per unit time for each metadata service in the distributed file storage cluster;
[0039] The metadata load pressure information corresponding to each metadata service is determined according to the number of metadata requests processed within the unit time length corresponding to each metadata service.
[0040] In an optional implementation of the present application, determining metadata load pressure information corresponding to each metadata service according to the number of metadata requests processed within a unit time period corresponding to each metadata service includes:
[0041] The metadata load pressure information corresponding to each metadata service is determined according to the number of metadata requests processed within the unit time period corresponding to each metadata service counted within the preset time period.
[0042] In an optional embodiment of the present application, determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load pressure information includes:
[0043] Determine the metadata load balancing value corresponding to each metadata service according to the metadata load pressure information;
[0044] The metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined according to the metadata load balancing values.
[0045] In an optional embodiment of the present application, determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load balancing values includes:
[0046] Determine whether there is a metadata load balancing value that exceeds a preset threshold;
[0047] If there is a metadata load balancing value exceeding the preset threshold, the step of determining metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services according to each metadata load balancing value is executed.
[0048] In an optional embodiment of the present application, determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load pressure information includes:
[0049] Obtain the load differences that each metadata service can withstand;
[0050] The metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined by combining the metadata load pressure information and the load difference.
[0051] In an optional implementation of the present application, obtaining metadata load pressure information corresponding to each metadata service in the distributed file storage cluster includes:
[0052] Get the number of read and write operations per second for each metadata service in the distributed file storage cluster;
[0053] The metadata load pressure information corresponding to each metadata service is determined according to the number of read and write operations performed by each metadata service per second.
[0054] In an optional implementation of the present application, determining the derived subtree partition and the imported subtree partition according to each migration parameter includes:
[0055] Sort each subtree partition according to each migration parameter to obtain a sorting result;
[0056] According to the sorting result, a first preset number of subtree partitions are selected from the end with a larger migration parameter as derived subtree partitions, and a second preset number of subtree partitions are selected from the end with a smaller migration parameter as imported subtree partitions.
[0057] In an optional embodiment of the present application, after selecting a first preset number of subtree partitions from the end with a larger migration parameter as derived subtree partitions according to the sorting result, the method further includes:
[0058] The remaining subtree partitions except the exporting subtree partition are determined as candidates for invalidation migration.
[0059] In an optional implementation manner of the present application, selecting a second preset number of subtree partitions from the end with a smaller migration parameter as import subtree partitions includes:
[0060] Count the number of subtree partitions in each subtree partition whose spare capacity is greater than or equal to the preset capacity value;
[0061] When the number of subtree partitions with spare capacity greater than or equal to the preset capacity value is greater than or equal to a second preset number, the second preset number of subtree partitions are selected from the end with the smaller migration parameter as the import subtree partitions;
[0062] When the number of subtree partitions whose spare capacity is greater than or equal to the preset capacity value is less than a second preset number, the subtree partition whose spare capacity is greater than or equal to the preset capacity value is determined as the import subtree partition.
[0063] According to a second aspect, the present application provides a metadata load balancing device, comprising:
[0064] A load pressure acquisition module is configured to acquire metadata load pressure information corresponding to each metadata service in the distributed file storage cluster;
[0065] A migration information determination module is configured to determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services based on metadata load pressure information;
[0066] A migration parameter acquisition module is configured to acquire migration parameters corresponding to each subtree partition in each target metadata service;
[0067] A subtree partition determination module is configured to determine an export subtree partition and an import subtree partition according to various migration parameters;
[0068] The metadata migration module is configured to migrate metadata of the metadata quantity to be migrated from the export subtree partition to the import subtree partition when the metadata migration time is reached.
[0069] According to a third aspect, the present application provides a metadata load balancing device, comprising:
[0070] a memory arranged to store a computer program;
[0071] The processor is configured to implement the steps of the above metadata load balancing method when executing the computer program.
[0072] According to a fourth aspect, the present application provides a computer non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above metadata load balancing method are implemented.
[0073] The metadata load balancing method provided in the present application obtains metadata load pressure information corresponding to each metadata service in a distributed file storage cluster; determines the metadata migration time, each target metadata service to be migrated, and the amount of metadata to be migrated between each target metadata service based on the metadata load pressure information; obtains migration parameters corresponding to each subtree partition in each target metadata service; determines an export subtree partition and an import subtree partition based on the migration parameters; and when the metadata migration time is reached, migrates metadata of the amount of metadata to be migrated from the export subtree partition to the import subtree partition.
[0074] As can be seen from the above technical solution, based on the metadata load pressure information corresponding to each metadata service, the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services can be accurately determined. Furthermore, based on the migration parameters corresponding to each subtree partition in each target metadata service, the export subtree partition and import subtree partition can be accurately determined to achieve accurate metadata migration. This improves the recognition of business load characteristics, significantly reduces the probability of unnecessary and ineffective metadata migration, effectively increases metadata throughput, improves performance bottlenecks caused by metadata in highly concurrent metadata-intensive file system services, has good metadata load balancing characteristics, and improves the stability of distributed storage systems.
[0075] Correspondingly, the present application also provides a metadata load balancing device, equipment and computer non-volatile readable storage medium corresponding to the above-mentioned metadata load balancing method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0077] FIG1 is a flowchart of an implementation method of metadata load balancing in an embodiment of the present application;
[0078] FIG2 is a schematic diagram of the structure of a distributed file storage metadata service subtree partition in an embodiment of the present application;
[0079] FIG3 is another implementation flow chart of the metadata load balancing method in an embodiment of the present application;
[0080] FIG4 is an architecture diagram of a metadata balancing method for distributed file storage according to an embodiment of the present application;
[0081] FIG5 is a structural block diagram of a metadata load balancing device according to an embodiment of the present application;
[0082] FIG6 is a structural block diagram of a metadata load balancing device according to an embodiment of the present application;
[0083] FIG7 is a schematic diagram of an optional structure of a metadata load balancing device provided in this embodiment. DETAILED DESCRIPTION
[0084] In order to enable those skilled in the art to better understand the present application, the present application is described below in conjunction with the accompanying drawings and optional implementation methods. Obviously, the embodiments described are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, other embodiments obtained by ordinary technicians in this field without making creative work are all within the scope of protection of this application.
[0085] Referring to FIG1 , FIG1 is a flowchart of an implementation method of metadata load balancing in an embodiment of the present application. The method may include the following steps:
[0086] S101: Obtain metadata load pressure information corresponding to each metadata service in a distributed file storage cluster.
[0087] Monitor the metadata load pressure of each metadata service in the distributed file storage cluster in advance, and obtain the metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, such as monitoring the number of metadata requests for each metadata service within a unit time or a preset time.
[0088] In an optional implementation of the present application, step S101 may include the following steps:
[0089] Step 1: Obtain the number of metadata requests processed per unit time by each metadata service in the distributed file storage cluster;
[0090] Step 2: Determine metadata load pressure information corresponding to each metadata service according to the number of metadata requests processed within the unit time period corresponding to each metadata service.
[0091] For the convenience of description, the above two steps can be combined for explanation.
[0092] The number of metadata requests processed per unit time by each metadata service in the distributed file storage cluster is monitored in advance. The number of metadata requests processed per unit time by each metadata service in the distributed file storage cluster is obtained. For example, the number of metadata requests processed per second by each metadata service is collected. Based on the number of metadata requests processed per unit time by each metadata service, metadata load pressure information corresponding to each metadata service is determined. By determining metadata load pressure information corresponding to each metadata service based on the number of metadata requests processed per unit time by each metadata service, the accuracy of metadata load pressure statistics for each metadata service is improved.
[0093] In an optional implementation of the present application, determining metadata load pressure information corresponding to each metadata service according to the number of metadata requests processed within a unit time period corresponding to each metadata service may include the following steps:
[0094] The metadata load pressure information corresponding to each metadata service is determined according to the number of metadata requests processed within the unit time period corresponding to each metadata service counted within the preset time period.
[0095] The metadata load pressure of each metadata service is determined by monitoring the number of metadata requests processed per unit time period for each metadata service within a preset time period. For example, the metadata load pressure of each metadata service can be determined by monitoring the number of metadata requests processed per second for each metadata service within 10 consecutive seconds. The metadata load pressure of each metadata service is determined by using the number of metadata requests processed per unit time period for each metadata service collected over a continuous period of time. For example, the average of 10 metadata requests collected for each metadata service within 10 seconds is used as the metadata load pressure of each metadata service. This reduces the probability of inaccurate metadata load pressure assessment due to accidental fluctuations in the number of metadata requests, thereby improving the accuracy of metadata load pressure assessment.
[0096] In an optional implementation of the present application, step S101 may include the following steps:
[0097] Step 1: Obtain the number of read and write operations per second for each metadata service in the distributed file storage cluster;
[0098] Step 2: Determine metadata load pressure information corresponding to each metadata service based on the number of read and write operations performed per second by each metadata service.
[0099] For the convenience of description, the above two steps can be combined for explanation.
[0100] It is pre-set to record the metadata load pressure of each metadata service by counting the number of read and write operations per second (Input / Output Operations Per Second, IOPS) of each metadata service. The number of read and write operations per second of each metadata service in the distributed file storage cluster is obtained respectively, and the metadata load pressure information corresponding to each metadata service is determined according to the number of read and write operations per second of each metadata service. The busyness of each metadata service is estimated by using the number of read and write operations per second of each metadata service as the main indicator. This value reflects the immediate load of each metadata service. For example, the metadata load pressure information corresponding to each metadata service can be determined by counting the average number of read and write operations per second over a period of time, thereby improving the accuracy of metadata load pressure assessment.
[0101] S102: Determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services according to metadata load pressure information.
[0102] After obtaining metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, the metadata migration time, the target metadata services for metadata migration, and the amount of metadata to be migrated between target metadata services are determined based on the metadata load pressure information. By accurately determining when to attempt the rebalancing process and making the right decisions about the amount of migration load, the migration frequency can be reduced and resource load waste caused by long migration processes can be avoided.
[0103] In an optional implementation of the present application, step S102 may include the following steps:
[0104] Step 1: Determine the metadata load balancing value corresponding to each metadata service based on the metadata load pressure information;
[0105] Step 2: Determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load balancing values.
[0106] For the convenience of description, the above two steps can be combined for explanation.
[0107] Based on metadata load pressure information, the metadata load balance value (LBV) corresponding to each metadata service is determined. The metadata load balance value represents the intensity of metadata load imbalance at each time interval (default 10 seconds). Based on each metadata load balance value, the metadata migration time, the target metadata services for metadata migration, and the amount of metadata to be migrated between target metadata services are determined. The metadata load balance value accurately measures the load balance status of each metadata service, improving the accuracy of estimates of metadata migration time, target metadata services for metadata migration, and the amount of metadata to be migrated between target metadata services.
[0108] In an optional embodiment of the present application, determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load balancing values may include the following steps:
[0109] Step 1: Determine whether there is a metadata load balancing value that exceeds a preset threshold. If there is a metadata load balancing value that exceeds the preset threshold, execute step 2. If there is no metadata load balancing value that exceeds the preset threshold, no processing is performed.
[0110] Step 2: Determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load balancing values.
[0111] For the convenience of description, the above two steps can be combined for explanation.
[0112] Based on the statistical load of each metadata service, not all imbalances require a re-load balancing process. A metadata load balancing threshold is pre-set. After determining the metadata load balancing value corresponding to each metadata service based on the metadata load pressure information, it is determined whether there is a metadata load balancing value that exceeds the preset threshold. If there is a metadata load balancing value that exceeds the preset threshold, the load rebalancing process is triggered and a migration plan is generated. The plan allocates the export metadata service (exporter MDS) and the import metadata service (importer MDS) to the metadata cluster. Based on each metadata load balancing value, the metadata migration time, the target metadata services to be migrated, and the number of metadata to be migrated between the target metadata services are determined. If there is no metadata load balancing value that exceeds the preset threshold, the load rebalancing process is temporarily not triggered and no processing is performed.
[0113] In an optional implementation of the present application, step S102 may include the following steps:
[0114] Step 1: Obtain the load differences that each metadata service can withstand;
[0115] Step 2: Determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services based on the metadata load pressure information and load difference.
[0116] For the convenience of description, the above two steps can be combined for explanation.
[0117] After obtaining metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, the method considers the differences in the load that each metadata service can withstand and determines the load differences that each metadata service can withstand. Combining these metadata load pressure information and load differences, the metadata migration time, the target metadata services for metadata migration, and the amount of metadata to be migrated between target metadata services are determined. By determining the amount of metadata to be migrated between target metadata services based on the load differences that each metadata service can withstand, the accuracy of metadata migration is improved.
[0118] S103: Obtain migration parameters corresponding to each subtree partition in each target metadata service.
[0119] See Figure 2, which illustrates a schematic diagram of the subtree partition structure of a distributed file storage metadata service in an embodiment of the present application. Each metadata service contains one or more subtree partitions. A migration parameter is pre-set to determine the load trend of the metadata service. The larger the migration parameter, the higher the probability that the corresponding subtree partition will be migrated. The migration parameters corresponding to each subtree partition in each target metadata service are obtained.
[0120] S104: Determine the export subtree partition and the import subtree partition according to the migration parameters.
[0121] After obtaining the migration parameters corresponding to each subtree partition in each target metadata service, the subtree partition with a higher migration parameter will transfer the excess workload in the busy metadata service to the metadata service with less load, and determine the export subtree partition and import subtree partition based on each migration parameter.
[0122] In an optional implementation manner of the present application, after step S104, the method may include the following steps:
[0123] Step 1: When there is a historical metadata access request table reflecting spatial locality in the historical metadata access request table maintained in each metadata service, a target subtree partition is selected from the subtree partitions at the same level as the derived subtree partition;
[0124] Step 2: Increase the migration parameters of the target subtree partition to the preset value.
[0125] For the convenience of description, the above two steps can be combined for explanation.
[0126] A historical metadata access request table is maintained in advance on each metadata service. When a historical metadata access request table reflecting spatial locality exists in the historical metadata access request table maintained in each metadata service, a target subtree partition is selected from the subtree partitions at the same level as the derived subtree partition, that is, there is a strong access correlation between subtree partitions at the same level, and the migration parameter of the target subtree partition is increased by a preset value, such as increasing the migration parameter of the target subtree partition by 1, thereby reducing the impact of spatial locality and achieving accurate statistics of the migration parameters of each subtree partition.
[0127] In an optional implementation of the present application, step S104 may include the following steps:
[0128] Step 1: Sort each subtree partition according to each migration parameter to obtain the sorting result;
[0129] Step 2: According to the sorting result, a first preset number of subtree partitions are selected from the end with a larger migration parameter as export subtree partitions, and a second preset number of subtree partitions are selected from the end with a smaller migration parameter as import subtree partitions.
[0130] For the convenience of description, the above two steps can be combined for explanation.
[0131] After obtaining the migration parameters corresponding to each subtree partition in each target metadata service, the subtree partitions are sorted according to the migration parameters to obtain a sorting result. Based on the sorting result, a first preset number of subtree partitions with larger migration parameters are selected as export subtree partitions, and a second preset number of subtree partitions with smaller migration parameters are selected as import subtree partitions. This allows the subtree partitions with higher migration parameters to transfer excess workload from busy metadata services to less loaded metadata services. The metadata cluster import and export process ensures data consistency and security.
[0132] It should be noted that there is no difference in size or order between the first and second preset numbers. They are only used to distinguish the number of exported subtree partitions and the number of imported subtree partitions. The first preset number and the second preset number can be the same or different.
[0133] In an optional embodiment of the present application, after selecting a first preset number of subtree partitions from the end with a larger migration parameter as derived subtree partitions according to the sorting result, the method may further include the following steps:
[0134] The remaining subtree partitions except the exporting subtree partition are determined as candidates for invalidation migration.
[0135] After selecting a first preset number of subtree partitions from the end with a larger migration parameter as derived subtree partitions according to the sorting result, the remaining subtree partitions except the derived subtree partitions are determined as invalid migration candidates, thereby avoiding invalid migration.
[0136] In an optional implementation manner of the present application, selecting a second preset number of subtree partitions from the end with a smaller migration parameter as import subtree partitions may include the following steps:
[0137] Step 1: Count the number of subtree partitions in each subtree partition whose spare capacity is greater than or equal to the preset capacity value;
[0138] Step 2: When the number of subtree partitions with spare capacity greater than or equal to the preset capacity value is greater than or equal to a second preset number, the second preset number of subtree partitions are selected from the end with the smaller migration parameter as the import subtree partitions;
[0139] Step three: when the number of subtree partitions with spare capacity greater than or equal to the preset capacity value is less than a second preset number, the subtree partition with spare capacity greater than or equal to the preset capacity value is determined as the import subtree partition.
[0140] For the convenience of description, the above three steps can be combined for explanation.
[0141] Considering that the imported subtree partitions need to have a certain amount of spare capacity to accommodate the incoming load. Count the number of subtree partitions in each subtree partition whose spare capacity is greater than or equal to the preset capacity value. When the number of subtree partitions whose spare capacity is greater than or equal to the preset capacity value is greater than or equal to the second preset number, the second preset number of subtree partitions are selected from the end with the smaller migration parameter as the imported subtree partitions. When the number of subtree partitions whose spare capacity is greater than or equal to the preset capacity value is less than the second preset number, the subtree partitions whose spare capacity is greater than or equal to the preset capacity value are determined as the imported subtree partitions. The present application formulates a metadata service subtree partition migration plan to select a reasonable number of subtree partitions as candidates for the imported subtree partitions, and selects the metadata service with the lowest load for migration, so as to ensure that the selected imported subtree partitions meet the capacity requirements while expanding the number of imported subtree partitions as much as possible. After the migration task arrives, the subtree selection component will select a group of suitable subtree partitions for metadata migration to achieve the optimal metadata balance state of the distributed file storage cluster.
[0142] S105: When the metadata migration time is reached, the metadata of the metadata quantity to be migrated is migrated from the export subtree partition to the import subtree partition.
[0143] After determining the metadata migration time, the amount of metadata to be migrated, the export subtree partition, and the import subtree partition, when the metadata migration time arrives, the metadata of the amount of metadata to be migrated is migrated from the export subtree partition to the import subtree partition. By making the right decision about the migration load, the migration frequency can be reduced and resource load waste caused by a long migration process can be avoided.
[0144] As can be seen from the above technical solution, based on the metadata load pressure information corresponding to each metadata service, the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services can be accurately determined. Furthermore, based on the migration parameters corresponding to each subtree partition in each target metadata service, the export subtree partition and import subtree partition can be accurately determined to achieve accurate metadata migration. This improves the recognition of business load characteristics, significantly reduces the probability of unnecessary and ineffective metadata migration, effectively increases metadata throughput, improves performance bottlenecks caused by metadata in highly concurrent metadata-intensive file system services, has good metadata load balancing characteristics, and improves the stability of distributed storage systems.
[0145] It should be noted that, based on the above embodiment, the present application also provides corresponding improved solutions. In subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, and will not be described in detail in the following improved embodiments.
[0146] Referring to FIG3 , FIG3 is another implementation flow chart of the metadata load balancing method in an embodiment of the present application. The method may include the following steps:
[0147] S301: Obtain metadata load pressure information corresponding to each metadata service through a load monitor deployed on each metadata service in a distributed file storage cluster.
[0148] See Figure 4, which is an architectural diagram of a metadata balancing method for distributed file storage in an embodiment of the present application. A load monitor is pre-deployed in each metadata service to monitor metadata load pressure. The load monitors deployed in each metadata service in the distributed file storage cluster obtain metadata load pressure information corresponding to each metadata service.
[0149] S302: The metadata migration startup program set in the pre-selected metadata service determines the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information.
[0150] As shown in Figure 4, a migration initiator is set in one of the metadata services in the distributed file storage system cluster, which is responsible for deciding when to migrate and how much metadata should be exchanged between metadata services. By setting the metadata migration initiator in the pre-selected metadata service, the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined according to the load pressure information of each metadata. The migration initiator of this application is a single-node component in the distributed file storage system, but it will not become a performance bottleneck because the migration process is carried out in the storage background and will run each time according to the configuration parameters (configurable, default is 10 seconds), and rarely consumes resources such as CPU (Central Processing Unit), memory and network bandwidth.
[0151] S303: Obtain migration parameters corresponding to each subtree partition in each target metadata service through the load analysis component deployed in each metadata service.
[0152] As shown in Figure 4, an independent load-aware migration planning module is pre-deployed in each metadata service. The load-aware migration planning module includes a load analysis component, which obtains the migration parameters corresponding to each subtree partition in each target metadata service through the load analysis component deployed in each metadata service.
[0153] In an optional implementation of the present application, step S303 may include the following steps:
[0154] Step 1: Use the load analysis component deployed in each metadata service to collect statistics on the historical workload corresponding to each subtree partition;
[0155] Step 2: Determine the metadata access differences of each subtree partition based on each historical workload;
[0156] Step 3: Determine the migration parameters corresponding to each subtree partition based on the metadata access differences.
[0157] For the convenience of description, the above three steps can be combined for explanation.
[0158] The load analysis component deployed in each metadata service calculates the historical workload corresponding to each subtree partition. Based on this historical workload, the metadata access differences for each subtree partition are determined. This metadata access difference is then used to determine the migration parameters for each subtree partition. By utilizing the load analysis component of each metadata service to calculate the impact of historical workloads and predict metadata access differences to calculate the migration probability, the accuracy of migration parameter statistics is improved.
[0159] In an optional implementation of the present application, determining the migration parameters corresponding to each subtree partition according to the metadata access difference may include the following steps:
[0160] Step 1: Get the preset maximum metadata throughput;
[0161] Step 2: When it is determined that there is a historical workload that is greater than the maximum metadata throughput, the migration parameters corresponding to each subtree partition are determined according to the metadata access difference.
[0162] For the convenience of description, the above two steps can be combined for explanation.
[0163] Based on the load statistics for each metadata service, not all imbalances require rebalancing. Although the number of read and write operations per second (ROPS) for each metadata service varies, all metadata services are significantly below their maximum metadata throughput. For example, the maximum ROPS for a single metadata service on a single distributed file storage node is pre-set to 1300. The pre-set maximum metadata throughput is obtained. When a historical workload exceeding the maximum metadata throughput is determined, migration parameters for each subtree partition are determined based on metadata access differences. The parameter mds_migration (metadata service migration) can also be introduced to describe the current level of imbalance. The higher the value, the more urgent the migration. The parameter mds_migration calculates the maximum metadata throughput over the same period and compares it to the theoretical value of 1300, which is smoothed within the range of (0, 1), facilitating migration timing identification. By pre-setting the maximum metadata throughput as a metric for determining whether rebalancing is necessary, the degree and urgency of metadata load imbalance in the distributed file storage cluster can be accurately determined, reducing the probability of unnecessary metadata migrations.
[0164] S304: Determine the export subtree partition and the import subtree partition according to each migration parameter through the subtree selection component deployed in each metadata service.
[0165] As shown in Figure 4, the load-aware migration planning module deployed in each metadata service also includes a subtree selection component. This subtree selection component, deployed in each metadata service, determines the export and import subtree partitions based on the migration parameters. The subtree selection component selects an appropriate set of subtree partitions for migration.
[0166] In an optional implementation of the present application, step S303 may include the following steps:
[0167] The load analysis component deployed in each metadata service obtains the migration parameters corresponding to each subtree partition in each target metadata service and the workload I / O pattern of the distributed file storage cluster;
[0168] Accordingly, step S304 may include the following steps:
[0169] When it is determined that the workload I / O mode is metadata-intensive IO, the subtree selection component deployed in each metadata service determines the export subtree partition and the import subtree partition according to each migration parameter.
[0170] The load analysis component deployed in each metadata service obtains the migration parameters corresponding to each subtree partition in each target metadata service and the workload I / O pattern of the distributed file storage cluster. When the workload I / O pattern is determined to be metadata-intensive IO, for example, a machine learning or modeling business with metadata requests accounting for more than 70%, and business characteristics spanning 1.8 million small files in 1,000 directories with an average size of 15KB, the subtree selection component deployed in each metadata service determines the export and import subtree partitions based on the migration parameters. By combining the migration parameters corresponding to each subtree partition and the workload I / O pattern of the distributed file storage cluster to determine whether to perform a rebalancing process, the probability of unnecessary metadata migration is reduced.
[0171] S305: When the metadata migration time is reached, the metadata of the metadata quantity to be migrated is migrated from the export subtree partition to the import subtree partition.
[0172] When the metadata migration time is reached, the metadata of the metadata to be migrated is migrated from the export subtree partition to the import subtree partition. This application has better metadata load balancing, effectively improving metadata throughput and improving the performance bottleneck caused by metadata in high-concurrency metadata-intensive file system services. In addition, this application has shorter metadata response time, can handle metadata cluster expansion and client workload growth, and improve the linear scalability of distributed clusters.
[0173] Corresponding to the above method embodiment, the present application further provides a metadata load balancing device. The metadata load balancing device described below and the metadata load balancing method described above can refer to each other.
[0174] Referring to FIG5 , FIG5 is a structural block diagram of a metadata load balancing device according to an embodiment of the present application. The device may include:
[0175] The load pressure acquisition module 51 is configured to acquire metadata load pressure information corresponding to each metadata service in the distributed file storage cluster;
[0176] The migration information determination module 52 is configured to determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information;
[0177] The migration parameter acquisition module 53 is configured to acquire the migration parameters corresponding to each subtree partition in each target metadata service;
[0178] A subtree partition determination module 54 is configured to determine an export subtree partition and an import subtree partition according to each migration parameter;
[0179] The metadata migration module 55 is configured to migrate metadata of the amount of metadata to be migrated from the export subtree partition to the import subtree partition when the metadata migration time is reached.
[0180] As can be seen from the above technical solution, based on the metadata load pressure information corresponding to each metadata service, the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services can be accurately determined. Furthermore, based on the migration parameters corresponding to each subtree partition in each target metadata service, the export subtree partition and import subtree partition can be accurately determined to achieve accurate metadata migration. This improves the recognition of business load characteristics, significantly reduces the probability of unnecessary and ineffective metadata migration, effectively increases metadata throughput, improves performance bottlenecks caused by metadata in highly concurrent metadata-intensive file system services, has good metadata load balancing characteristics, and improves the stability of distributed storage systems.
[0181] In an optional implementation of the present application, the load pressure acquisition module 51 may be a module that acquires metadata load pressure information corresponding to each metadata service through a load monitor deployed on each metadata service in the distributed file storage cluster.
[0182] In an optional embodiment of the present application, the migration information determination module 55 can be a module that is set up as a metadata migration startup program in a pre-selected metadata service, and determines the metadata migration time, the target metadata services to be migrated, and the number of metadata to be migrated between the target metadata services according to the metadata load pressure information.
[0183] In an optional implementation of the present application, the migration parameter acquisition module 53 may be a module that acquires the migration parameters corresponding to each subtree partition in each target metadata service through a load analysis component deployed in each metadata service;
[0184] The subtree partition determination module 54 may be a module that determines the export subtree partition and the import subtree partition according to various migration parameters through a subtree selection component deployed in each metadata service.
[0185] In an optional embodiment of the present application, the migration parameter acquisition module 53 may be a module that obtains the migration parameters corresponding to each subtree partition in each target metadata service and the workload I / O mode of the distributed file storage cluster through a load analysis component deployed in each metadata service;
[0186] The subtree partition determination module 54 may be a module that determines the export subtree partition and the import subtree partition according to each migration parameter through the subtree selection component deployed in each metadata service when the workload I / O mode is determined to be metadata-intensive IO.
[0187] In an optional implementation of the present application, the migration parameter acquisition module 53 includes:
[0188] The historical workload statistics submodule is configured to count the historical workload corresponding to each subtree partition through the load analysis component deployed in each metadata service;
[0189] a metadata access difference determination submodule, configured to determine metadata access differences of each subtree partition based on each historical workload;
[0190] The migration parameter determination submodule is configured to determine the migration parameters corresponding to each subtree partition according to metadata access differences.
[0191] In an optional implementation of the present application, the migration parameter determination submodule includes:
[0192] a metadata maximum throughput obtaining unit, configured to obtain a preset metadata maximum throughput;
[0193] The migration parameter determination unit is configured to determine the migration parameters corresponding to each subtree partition according to the metadata access difference when it is determined that there is a historical workload greater than the maximum metadata throughput.
[0194] In an optional embodiment of the present application, the device may further include:
[0195] The subtree partition selection module is configured to, after determining the export subtree partition and the import subtree partition according to each migration parameter, select a target subtree partition from the subtree partitions at the same level as the export subtree partition when there is a historical metadata access request table reflecting spatial locality in the historical metadata access request tables maintained in each metadata service;
[0196] The migration parameter increasing module is configured to increase the migration parameter of the target subtree partition by a preset value.
[0197] In an optional embodiment of the present application, the load pressure acquisition module 51 includes:
[0198] The metadata request number acquisition submodule is configured to acquire the number of metadata requests processed within a unit time period corresponding to each metadata service in the distributed file storage cluster;
[0199] The load pressure determination submodule is configured to determine metadata load pressure information corresponding to each metadata service according to the number of metadata requests processed within a unit time period corresponding to each metadata service.
[0200] In an optional embodiment of the present application, the load pressure determination submodule can be a module that determines the metadata load pressure information corresponding to each metadata service based on the number of metadata requests processed within a unit time period corresponding to each metadata service counted within a preset time period.
[0201] In an optional implementation of the present application, the migration information determination module 52 includes:
[0202] A load balancing value determination submodule is configured to determine metadata load balancing values corresponding to respective metadata services according to metadata load pressure information;
[0203] The migration information determination submodule is configured to determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services according to the metadata load balancing values.
[0204] In an optional implementation of the present application, the migration information determination submodule includes:
[0205] a determination unit configured to determine whether a metadata load balancing value exceeds a preset threshold;
[0206] The migration information determining unit is configured to determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load balancing values when it is determined that there is a metadata load balancing value exceeding a preset threshold.
[0207] In an optional implementation of the present application, the migration information determination module 52 includes:
[0208] The load difference acquisition submodule is configured to obtain the load difference that each metadata service can bear;
[0209] The migration information determination submodule is configured to determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services based on metadata load pressure information and load difference.
[0210] In an optional embodiment of the present application, the load pressure acquisition module 51 includes:
[0211] The read and write operation count acquisition submodule is configured to respectively acquire the number of read and write operations per second performed by each metadata service in the distributed file storage cluster;
[0212] The load pressure determination submodule is configured to determine metadata load pressure information corresponding to each metadata service according to the number of read and write operations performed by each metadata service per second.
[0213] In an optional implementation manner of the present application, the subtree partition determination module includes:
[0214] The subtree partition sorting submodule is configured to sort each subtree partition according to each migration parameter to obtain a sorting result;
[0215] The subtree partition selection submodule is configured to select a first preset number of subtree partitions from the end with a larger migration parameter as export subtree partitions according to the sorting result, and select a second preset number of subtree partitions from the end with a smaller migration parameter as import subtree partitions.
[0216] In an optional embodiment of the present application, the device may further include:
[0217] The invalid migration candidate determination module is configured to select a first preset number of subtree partitions from the end with a larger migration parameter as derived subtree partitions according to the sorting result, and then determine the remaining subtree partitions except the derived subtree partitions as invalid migration candidates.
[0218] In an optional embodiment of the present application, the subtree partition selection submodule includes:
[0219] a subtree partition quantity counting unit configured to count the number of subtree partitions in each subtree partition whose spare capacity is greater than or equal to a preset capacity value;
[0220] The first import subtree partition selection unit is configured to select a second preset number of subtree partitions from the end with a smaller migration parameter as import subtree partitions when the number of subtree partitions with spare capacity greater than or equal to the preset capacity value is greater than or equal to a second preset number;
[0221] The second import subtree partition selection unit is configured to determine the subtree partition with spare capacity greater than or equal to the preset capacity value as the import subtree partition when the number of subtree partitions with spare capacity greater than or equal to the preset capacity value is less than a second preset number.
[0222] Corresponding to the above method embodiment, referring to FIG6 , FIG6 is a schematic diagram of a metadata load balancing device provided by the present application, which may include:
[0223] Memory 332, configured to store computer programs;
[0224] The processor 322 is configured to implement the steps of the metadata load balancing method of the above method embodiment when executing the computer program.
[0225] Optionally, please refer to Figure 7, which is a schematic diagram of an optional structure of a metadata load balancing device provided in this embodiment. The metadata load balancing device may have relatively large differences due to different configurations or performance, and may include a processor (central processing unit, CPU) 322 (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a persistent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Optionally, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the metadata load balancing device 301.
[0226] The metadata load balancing device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0227] The steps in the metadata load balancing method described above can be implemented by the structure of a metadata load balancing device.
[0228] Corresponding to the above method embodiments, the present application further provides a computer non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0229] Obtain metadata load pressure information corresponding to each metadata service in a distributed file storage cluster; determine metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between target metadata services based on each metadata load pressure information; obtain migration parameters corresponding to each subtree partition in each target metadata service; determine export subtree partitions and import subtree partitions based on each migration parameter; when the metadata migration time is reached, migrate the metadata of the amount of metadata to be migrated from the export subtree partition to the import subtree partition.
[0230] The computer non-volatile readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other non-volatile readable storage media that can store program codes.
[0231] For an introduction to the computer non-volatile readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0232] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the same or similar parts between the various embodiments. The devices, equipment, and computer-readable non-volatile storage media disclosed in the embodiments correspond to the methods disclosed in the embodiments, so their descriptions are relatively simple. For relevant details, refer to the method descriptions.
[0233] Optional examples are used herein to illustrate the principles and implementation methods of this application. The description of the above embodiments is only intended to help understand the technical solution and core ideas of this application. It should be noted that for those skilled in the art, without departing from the principles of this application, various improvements and modifications can be made to this application, and such improvements and modifications also fall within the scope of protection of the claims of this application.
Claims
1. A metadata load balancing method, It is characterized in that include: Obtain metadata load pressure information corresponding to each metadata service in the distributed file storage cluster; Determine metadata migration time, target metadata services to be migrated, and quantity of metadata to be migrated between target metadata services according to the metadata load pressure information; Obtain migration parameters corresponding to each subtree partition in each target metadata service; Determine the export subtree partition and the import subtree partition according to each of the migration parameters; When the metadata migration time is reached, the metadata of the amount of metadata to be migrated is migrated from the export subtree partition to the import subtree partition.
2. The metadata load balancing method according to claim 1, It is characterized in that Get metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, including: The metadata load pressure information corresponding to each metadata service is obtained through a load monitor deployed on each metadata service in the distributed file storage cluster.
3. The metadata load balancing method according to claim 1, It is characterized in that Determining metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information includes: By setting a metadata migration startup program in a pre-selected metadata service, the metadata migration time, the target metadata services to be migrated and the amount of metadata to be migrated between the target metadata services are determined according to the metadata load pressure information.
4. The metadata load balancing method according to any one of claims 1 to 3, It is characterized in that Obtaining migration parameters corresponding to each subtree partition in each target metadata service, including: Obtaining migration parameters corresponding to each subtree partition in each target metadata service through a load analysis component deployed in each metadata service; Determining the export subtree partition and the import subtree partition according to each of the migration parameters includes: The export subtree partition and the import subtree partition are determined according to each migration parameter by a subtree selection component deployed in each metadata service.
5. The metadata load balancing method according to claim 4, It is characterized in that Obtaining migration parameters corresponding to each subtree partition in each target metadata service through a load analysis component deployed in each metadata service, including: Obtaining migration parameters corresponding to each subtree partition in each target metadata service and a workload I / O mode of the distributed file storage cluster through a load analysis component deployed in each metadata service; Determining the export subtree partition and the import subtree partition according to each migration parameter by a subtree selection component deployed in each metadata service includes: When it is determined that the workload I / O mode is metadata-intensive IO, the export subtree partition and the import subtree partition are determined according to each migration parameter by a subtree selection component deployed in each metadata service.
6. The metadata load balancing method according to claim 4, It is characterized in that Obtaining migration parameters corresponding to each subtree partition in each target metadata service through a load analysis component deployed in each metadata service, including: By using a load analysis component deployed in each of the metadata services, statistics are collected on the historical workloads corresponding to each of the subtree partitions; Determine metadata access differences of each of the subtree partitions according to each of the historical workloads; The migration parameters corresponding to each subtree partition are determined according to the metadata access difference.
7. The metadata load balancing method according to claim 6, It is characterized in that Determining migration parameters corresponding to each subtree partition according to the metadata access difference includes: Get the preset maximum metadata throughput; When it is determined that there is a historical workload greater than the maximum metadata throughput, migration parameters corresponding to each of the subtree partitions are determined according to the metadata access difference.
8. The metadata load balancing method according to claim 6, It is characterized in that After determining the export subtree partition and the import subtree partition according to the migration parameters, the method further includes: When there is a historical metadata access request table reflecting spatial locality in the historical metadata access request table maintained in each of the metadata services, selecting a target subtree partition from subtree partitions at the same level as the derived subtree partition; The migration parameter of the target subtree partition is increased by a preset value.
9. The metadata load balancing method according to claim 1, It is characterized in that Get metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, including: Obtain the number of metadata requests processed within a unit time period respectively corresponding to each metadata service in the distributed file storage cluster; The metadata load pressure information corresponding to each metadata service is determined according to the number of metadata requests processed within the unit time period corresponding to each metadata service.
10. The metadata load balancing method according to claim 9, It is characterized in that Determining metadata load pressure information corresponding to each metadata service according to the number of metadata requests processed within a unit time period corresponding to each metadata service, including: The metadata load pressure information corresponding to each metadata service is determined according to the number of metadata requests processed within the unit time period corresponding to each metadata service counted within the preset time period.
11. The metadata load balancing method according to claim 1, It is characterized in that Determining metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information includes: Determine the metadata load balancing value corresponding to each metadata service according to each metadata load pressure information; The metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined according to the metadata load balancing values.
12. The metadata load balancing method according to claim 11, It is characterized in that Determining metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load balancing values includes: Determine whether there is a metadata load balancing value that exceeds a preset threshold; If there is a metadata load balancing value exceeding the preset threshold, the step of determining the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load balancing values is performed.
13. The metadata load balancing method according to claim 1, It is characterized in that Determining metadata migration time, target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information includes: Obtaining the difference in loads that each metadata service can bear; The metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services are determined in combination with the metadata load pressure information and the load difference.
14. The metadata load balancing method according to claim 1, It is characterized in that Get metadata load pressure information corresponding to each metadata service in the distributed file storage cluster, including: Obtain the number of read and write operations performed per second by each metadata service in the distributed file storage cluster respectively; The metadata load pressure information corresponding to each metadata service is determined according to the number of read and write operations performed by each metadata service per second.
15. The metadata load balancing method according to claim 1, It is characterized in that Determining the export subtree partition and the import subtree partition according to each of the migration parameters includes: Sorting each of the subtree partitions according to each of the migration parameters to obtain a sorting result; According to the sorting result, a first preset number of subtree partitions are selected from the end with a larger migration parameter as the derived subtree Partitions are created, and a second preset number of subtree partitions are selected from the end with a smaller migration parameter as the import subtree partitions.
16. The metadata load balancing method according to claim 15, It is characterized in that After selecting a first preset number of subtree partitions from the end with a larger migration parameter as the derived subtree partitions according to the sorting result, the method further includes: The remaining subtree partitions except the derived subtree partition are determined as candidates for invalid migration.
17. The metadata load balancing method according to claim 15, It is characterized in that Selecting a second preset number of subtree partitions from the end with a smaller migration parameter as the import subtree partitions includes: Count the number of subtree partitions in each subtree partition whose spare capacity is greater than or equal to the preset capacity value; When the number of subtree partitions whose spare capacity is greater than or equal to the preset capacity value is greater than or equal to the second preset number, the second preset number of subtree partitions are selected from the end with a smaller migration parameter as the imported subtree partitions; When the number of subtree partitions whose spare capacity is greater than or equal to the preset capacity value is less than the second preset number, the subtree partition whose spare capacity is greater than or equal to the preset capacity value is determined as the imported subtree partition.
18. A metadata load balancing device, It is characterized in that include: A load pressure acquisition module is configured to acquire metadata load pressure information corresponding to each metadata service in the distributed file storage cluster; A migration information determination module is configured to determine the metadata migration time, the target metadata services to be migrated, and the amount of metadata to be migrated between the target metadata services according to the metadata load pressure information; A migration parameter acquisition module is configured to acquire migration parameters corresponding to each subtree partition in each target metadata service; A subtree partition determination module, configured to determine an export subtree partition and an import subtree partition according to each of the migration parameters; The metadata migration module is configured to migrate the metadata of the amount of metadata to be migrated from the export subtree partition to the import subtree partition when the metadata migration time is reached.
19. A metadata load balancing device, It is characterized in that include: a memory arranged to store a computer program; A processor is configured to implement the steps of the metadata load balancing method as described in any one of claims 1 to 17 when executing the computer program.
20. A non-volatile computer readable storage medium, It is characterized in that The computer non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the metadata load balancing method according to any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Distributed storage-based dynamic metadata optimizing method and system
CN107145307A
Data equalization method and system based on MDS subtree equalization algorithm
CN111459407A
Load balancing control method and device, storage medium and electronic equipment
CN111666159A
Load balancing control method and device, storage medium and electronic equipment
CN112256438A
Metadata load balancing method, device and equipment and readable storage medium
CN115952005A
Cited By
Metadata expansion method and device under distributed file system, equipment and storage medium
CN119127825A
Load balancing method and device, electronic equipment, storage medium and program product
CN120276873A
