A Ceph storage system data migration method based on P4 network telemetry optimization

By optimizing data migration in the Ceph storage system using P4 network telemetry and the TOPSIS/KM algorithm, the problem of uneven data distribution was resolved, achieving efficient resource utilization and performance improvement.

CN119960698BActive Publication Date: 2025-09-26GUILIN UNIV OF ELECTRONIC TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510125769.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-09-26
Estimated Expiration
2045-01-27

AI Technical Summary

Technical Problem

The existing Ceph storage system has the problem of uneven data distribution, which leads to storage space waste and uneven read and write performance, affecting cluster performance and fault tolerance recovery costs.

Method used

A data migration method based on P4 network telemetry optimization is adopted. The attribute information of the Ceph storage system is monitored in real time through the P4 switch. The TOPSIS algorithm and KM algorithm are used to optimize the data migration path, divide the outgoing and incoming sets, and achieve uniform data distribution and efficient migration.

Benefits of technology

While ensuring that service quality is not affected, the cluster resource utilization efficiency is improved, resource waste is reduced, the data migration path is optimized, and system performance and read and write performance are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960698B_ABST
    Figure CN119960698B_ABST
Patent Text Reader

Abstract

The present invention discloses a Ceph storage system data migration method based on P4 network telemetry optimization. By introducing P4 network telemetry technology, real-time monitoring of network and storage status is achieved, detailed key performance indicators are obtained, and data migration decisions are made fine-grained down to the level of a single placement group based on this information. During the data migration decision-making process, complex network and storage problems are abstracted into a dual-objective optimization problem. Based on this, a migration control algorithm based on time-triggered TOPSIS and KM is proposed. By dividing and controlling time slots, the constrained nonlinear optimization problem is converted into a linear optimization problem controlled by multiple time slots. The correspondence between the outgoing set and the incoming set is determined at intervals. The OSD migrates based on this correspondence, and adjustments are made after the time slot ends. The present invention can enhance the adaptability of heterogeneous storage environments, improve system response speed, and enhance decision-making capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Ceph distributed storage, and in particular to a Ceph storage system data migration method based on P4 network telemetry optimization. Background Art

[0002] Ceph, an open-source, software-defined distributed object storage system, stands out among other distributed storage solutions for its exceptional scalability and high reliability. It can easily manage large-scale clusters with hundreds or thousands of nodes and petabyte-scale capacity or more. Ceph's core philosophy is decentralization, ensuring high availability and scalability through data replication and distribution. Specifically, data is first divided into multiple storage objects with unique identifiers (OIDs). These objects are then evenly and randomly distributed across placement groups (PGs) using a static mapping method using hashing and masking operations. PGs, the fundamental unit of data distribution and management in Ceph, are managed by object storage daemons (OSDs), or storage nodes. Ceph then randomly maps PGs to corresponding OSDs using the CRUSH (Controlled Replication Under Scalable Hashing) algorithm. Based on the OID and a specified hash function, the CRUSH algorithm quickly determines the corresponding storage node for an object. In addition, to improve the flexibility of data distribution, Ceph has also introduced an upmap operation for more fine-grained control of data distribution, which maps PG to a set of selected storage nodes according to custom strategies, thereby directly migrating or redistributing data.

[0003] Although one of Ceph's primary design goals is balanced data distribution, in practice, when a Ceph cluster has a large number of objects, the pseudo-random nature of the CRUSH algorithm can lead to highly uneven data distribution within the storage system, resulting in significant variations in space utilization across storage nodes. Furthermore, when the space utilization of any storage node reaches a certain threshold (95% by default), the entire cluster halts data writes. Based on real-world testing and operational experience, when a Ceph cluster relies solely on the CRUSH algorithm for data distribution and reaches an unwritable state, overall storage space utilization often struggles to reach 80%, with some OSDs experiencing space utilization as low as 50%-60%. Therefore, when data is unevenly distributed within a Ceph cluster, storage space can be significantly wasted. Furthermore, this imbalanced data distribution can lead to uneven distribution of read and write loads, impacting the read and write performance of the Ceph cluster. If a storage node with relatively high space utilization fails, the cost of fault recovery becomes significantly higher. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that the existing Ceph storage system still has the problem of uneven data distribution. A Ceph storage system data migration method based on P4 network telemetry optimization is provided, which can maximize the efficiency of cluster resource utilization while ensuring that the quality of service (QoS) is not significantly affected.

[0005] To solve the above problems, the present invention is achieved through the following technical solutions:

[0006] A Ceph storage system data migration method based on P4 network telemetry optimization includes the following steps:

[0007] Step 1: Use the P4 switch to collect attribute information of the Ceph storage system in the current time slot;

[0008] Step 2: Calculate the OSD storage space occupancy rate and the system average storage space occupancy rate of the current time slot based on the collected attribute information of the current time slot OSD used storage space, and divide each OSD into the outgoing set or the incoming set, that is:

[0009] If the OSD storage space occupancy rate in the current time slot is greater than or equal to the system average storage space occupancy rate in the current time slot, it is assigned to the migration set;

[0010] If the OSD storage space occupancy rate in the current time slot is less than the average storage space occupancy rate of the system in the current time slot, it is divided into the migration set;

[0011] Step 3: Use the TOPSIS algorithm to calculate the path weights between each outgoing OSD in the outgoing set and each incoming OSD in the incoming set in the current time slot.

[0012] Step 4: Use the KM algorithm to solve the following optimization problem to obtain the transmission relationship between each outgoing OSD in the outgoing set and each incoming OSD in the incoming set in the current time slot; the optimization problem is:

[0013]

[0014] stz ki (t)∈{0,1}

[0015] Where z ki (t) represents the time slot t migration and migration The transmission relationship between ki (t) represents the time slot t migration and migration The path weight between ki (t) = 1 means time slot t is moved out and migration There is a transmission relationship between them, z ki (t) = 0 means time slot t is moved out and migration There is no transmission relationship between n out (t) represents the number of OSDs that have moved out of the set in time slot t, n in (t) represents the number of OSDs that migrated into the set in time slot t;

[0016] Step 5: Based on the transmission relationship between each OSD in the outgoing set and each OSD in the incoming set in the current time slot, each outgoing OSD in the outgoing set transmits the PG to the corresponding incoming OSD in the incoming set. At the same time, in the process of each outgoing OSD transmitting the PG to its corresponding incoming OSD, once the current outgoing OSD has transmitted the PG to be transmitted or the storage space occupancy rate of the current incoming OSD reaches the system average storage space occupancy rate, the transmission is stopped.

[0017] Step 6: When the next time slot arrives, use the P4 switch to collect the attribute information of the Ceph storage system in the current time slot;

[0018] Step 7. Calculate the OSD storage space occupancy rate of the current time slot and the system average storage space occupancy rate of the current time slot based on the used storage space of the OSD in the current time slot in the collected attribute information, and determine whether the difference between the storage space occupancy rate of all OSDs in the current time slot and the system average storage space occupancy rate does not exceed the set threshold ε: if so, end the loop; otherwise, go to step 2.

[0019] Ceph storage system attribute information includes network bandwidth, latency, CPU utilization, running memory usage, I / O performance, and used storage space.

[0020] OSD storage space occupancy u in time slot t i (t) is:

[0021]

[0022] Average storage space occupancy of the system in time slot t for:

[0023]

[0024] Where U i (t) represents the t-time slot OSDO i Used storage space, C i Represents OSDO i The total storage space of Ceph, n is the total number of OSDs in the Ceph storage system.

[0025] t time slot migration and migration The path weight w between ki (t) is:

[0026]

[0027] Where, Indicates moving out Corresponding migration The measured value of attribute j of Indicates moving out Corresponding migration Normalized value of attribute j, k=1,2,...,n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s represents the number of attributes, max(·) represents the maximization function, and min(·) represents the minimization function.

[0028] For the OSD effect attribute j, the migration Corresponding migration The normalized value of attribute j for:

[0029]

[0030] For the non-effect attribute j of OSD, the migration Corresponding migration The normalized value of attribute j for:

[0031]

[0032] Where, Indicates moving out Corresponding migration The measured value of attribute j, k = 1, 2, ..., n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s Indicates the number of attributes.

[0033] Compared with the prior art, the present invention has the following characteristics:

[0034] 1. Utilizing deep integration with Ceph mechanisms, seamless integration enables intelligent data management, enabling rapid deployment without changing existing architectures. By introducing P4 network telemetry technology, real-time monitoring of network and storage status is achieved, providing detailed key performance indicators. Based on this information, data migration decisions are made down to the individual placement group level, enhancing adaptability to heterogeneous storage environments.

[0035] 2. This paper abstracts complex network and storage issues into a dual-objective optimization problem and proposes a migration control algorithm based on time-triggered TOPSIS and KM. By dividing and controlling time slots, this algorithm transforms the constrained nonlinear optimization problem into a linear optimization problem with multi-time slot control. The corresponding relationship between the outgoing and incoming sets is determined at regular intervals. OSDs migrate based on this relationship and make adjustments after the time slot ends. This effectively addresses the balancing problem of existing methods and improves system response speed and decision-making capabilities.

[0036] 3. Migration decision-making can avoid resource waste and risk, reduce redundant operations, and optimize path selection. Precise data migration strategies ensure even data distribution, preventing overloaded nodes while leaving others idle, thereby reducing resource waste. Furthermore, selecting the most efficient data migration path reduces migration time and network bandwidth usage, thereby improving overall system performance, including overall IOPS (Input / Output Operations Per Second). BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is the P4-DynaBalance architecture diagram;

[0038] Figure 2 This is a diagram of data migration for OSDs in the Ceph storage system. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to specific examples and the accompanying drawings.

[0040] Considering that P4 (Programming Protocol-Independent Packet Processors) is a programmable packet processor programming language, it can provide network administrators and engineers with the ability to control the packet forwarding path and processing method through programming. The present invention innovatively applies P4 technology to real-time monitoring of OSD (Object Storage Daemon) node status information in the Ceph storage system. Through the P4 programmable switch, we can collect key performance indicators in real time and provide real-time data support for data migration decisions. Based on this, the present invention proposes a data rebalancing architecture (P4-DynaBalance) based on P4, such as Figure 1 As shown in the figure, the core of the P4-DynaBalance architecture lies in the monitor module, located in the control plane. It is responsible for collecting and processing key performance indicators of OSD nodes. This data is collected, cleaned, filtered, integrated, and normalized in real time to create a unified and complete data view, providing standardized and comparable data support for decision-making analysis in the upper-layer application plane. On the application plane, the TOPSIS algorithm scoring module and the KM algorithm solving module use the data provided by the monitor module to evaluate node performance and solve the optimal data migration solution. The TOPSIS algorithm evaluates the comprehensive performance of OSD nodes, while the KM algorithm determines the optimal match for data migration, achieving the lowest cost and highest efficiency. Based on the decisions made by the application plane, the controller module of the control plane formulates specific data migration instructions and sends them to the data plane. The data plane consists of two or more data centers. Each data center consists of multiple racks, each equipped with monitoring nodes and storage nodes. These nodes work together to support data migration. Data centers are interconnected by P4 switches, forming an efficient cluster topology. The P4-DynaBalance architecture's workflow begins with the control plane's monitor module collecting cluster information, followed by TOPSIS scoring and KM algorithm solving in the application plane. The control plane's controller module formulates migration instructions, and finally, the data plane executes the data migration. This entire process ensures comprehensive, real-time awareness of cluster status, laying the foundation for efficient and accurate data migration control.

[0041] In order to achieve intelligent and efficient OSD data rebalancing on the basis of the P4-DynaBalance architecture and ensure the high performance and stability of the Ceph system. The data migration method proposed in the present invention needs to ensure that the data migration cost (including not only the direct amount of migrated data, but also the comprehensive factors such as the occupancy of network bandwidth, additional I / O load and increase in CPU utilization during the migration process) is as low as possible, while making all OSDs after migration reach the most balanced storage space occupancy possible, thereby improving the overall performance and resource utilization efficiency of the system. To this end, the present invention first divides all OSDs of the system into an outgoing set and an incoming set according to the memory utilization of the OSD, constructs a bipartite graph, and uses a path scoring function to comprehensively consider factors such as network bandwidth, latency, CPU utilization, running memory usage, I / O performance and storage space, and uses the path scoring function to take into account factors such as network bandwidth, latency, CPU utilization, running memory usage, I / O performance and storage space, and uses the path scoring from the outgoing OSD to the incoming OSD as the weight of the edge to measure the migration cost. The objective function is then defined as a dual-objective optimization problem: on the one hand, the sum of the migration path scores is minimized to reduce the total migration cost; on the other hand, the standard deviation of the OSD memory utilization after migration is minimized to achieve balanced data distribution. By weightedly combining these two objectives, a solvable optimization objective function is derived. Based on this, two constraints are introduced: first, the size of the PG migrated out of each OSD cannot be larger than the total capacity (storage space) of the OSD; second, the size of the PG migrated into each OSD cannot be smaller than the total capacity (storage space) of the OSD.

[0042] See also Figure 2 During the data migration process of the OSD in the Ceph storage system, the collection of all OSDs in the Ceph storage system Among them O i Represents the i-th OSD, i=1,2,...,n, n represents the total number of OSDs, that is,

[0043] For each OSDO i , its OSD storage space occupancy u i It can be expressed as:

[0044]

[0045] For OSD sets The average storage space usage of the system It can be expressed as:

[0046]

[0047] Among them, U i Represents OSDO i Used storage space, C i Represents OSDO iThe total storage space of n is the total number of OSDs.

[0048] Based on the system's average storage space usage And each OSD storage space occupancy u i , you can set OSD Divided into two sets, namely the migration set and the incoming collection

[0049]

[0050] By moving out of the collection and the incoming collection A bipartite graph can be constructed for the migration problem ε={e ij}express The set of middle edges, e ij Indicates migration from To move in The edge, In the data migration problem of OSD, the edge ij Corresponding to the migration To move in The network path, its score w ij =w(e ij ) depends on network bandwidth, latency, and OSD CPU utilization, running memory usage, I / O performance, and used storage space. ij The higher the value, the higher the ij The higher the migration cost of PG, the lower the score w ij The lower it is, the higher the e ij The higher the migration cost of PG, the greater the cost.

[0051] When migrating OSD data, we need to consider both the minimum migration cost (high score) and the maximum possible balance of data across each OSD.

[0052] The problem of minimizing the migration cost can be expressed as follows:

[0053]

[0054] Among them, w ij Indicates moving out Migration to relocation The path score, y ij Indicates moving out Migration to migration PG size, Indicates the number of OSDs that have been moved out, i.e. the set that has been moved out The size of Indicates the number of migrated OSDs, i.e., the migrated set The size of n out +n in =n.

[0055] The problem of storing data as evenly as possible on each OSD can be expressed as follows:

[0056]

[0057] Among them, std(·) represents the standard deviation of a vector, Indicates the storage space usage after all OSD migrations are completed. Represents OSDO l Storage space usage after completion:

[0058]

[0059] Among them, U l Represents OSDO l Used storage space, C l Represents OSDO l Total storage space, y lj Indicates moving out Migration to migration PG size, y il Indicates moving out Migration to migration PG size.

[0060] The size of the PG migrated from each OSD cannot be greater than the total capacity of the OSD, that is:

[0061]

[0062] After each OSD is migrated to the PG, it cannot be less than the total capacity of the OSD, that is:

[0063]

[0064] Based on the above analysis, the OSD data migration problem can be modeled into the following mathematical optimization model:

[0065]

[0066] This is a bipartite graph bi-objective optimization problem, which can be obtained by weighting:

[0067]

[0068] Wherein, α1 represents a given weighting coefficient.

[0069] To solve the above constrained optimization problem P2, we first need to find the score w of each edge of the constructed bipartite graph. ij Then, we use Lingo, a software for solving optimization problems, to solve the optimization problem and obtain the best y ij ; Finally, according to y ij The corresponding set of PGs to be migrated in the OSD to be migrated is used to solve the PGs that need to be migrated. However, there are two problems in solving the above optimization problem: ① The decision variable y ij The dimension is n out ×n in , the number of constraint equations is n, so the size of the solution space (feasible region) is n out ×n in -n. When using Lingo to solve the problem, many identical solutions may be encountered, resulting in a non-unique optimal solution. ② The second term in the objective function of the optimization problem P2 is nonlinear. Although it can be solved by Lingo, it takes a long time and is difficult to meet the requirements of real-time control.

[0070] In order to solve these two problems, the present invention designs a migration control algorithm based on time-triggered TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) and KM (Kuhn-Munkres). This algorithm does not directly solve the above-mentioned optimization problem P2, but divides the above-mentioned work into a linear optimization problem of multi-time slot control. The correspondence between the outgoing set and the incoming set is determined at regular intervals. The OSD migrates according to this correspondence and makes adjustments after the time slot ends. Although doing so may sacrifice a certain degree of migration efficiency, it can solve the two problems ①② of directly solving the above-mentioned optimization problem P2.

[0071] 1) Time-triggered superiority-inferiority distance method (TOPSIS)

[0072] Time-triggered TOPSIS is a multi-attribute decision-making strategy that collects multidimensional state attributes related to OSD nodes (such as network bandwidth, latency, and the OSD's CPU utilization, running memory usage, I / O performance, and used storage space) at regular intervals. This strategy constructs a decision matrix between OSDs that are migrating out and those that are migrating in, and normalizes the benefit- and cost-related attributes. Next, the algorithm determines the ideal solution (the best option) and the negative ideal solution (the worst option) based on the normalized matrix. The Euclidean distance from each OSD node to the ideal and negative ideal solutions is calculated. Finally, the path score between the OSDs that are migrating out and those that are migrating in is quantified by calculating the relative proximity of the paths.

[0073] Define t time slot migration Migration attribute matrix in Indicates time slot t migration Corresponding migration The measured value of attribute j, n in Indicates the number of migrated OSDs, n s Indicates the number of OSD attributes. In the present invention, the number of OSD attributes n s =6, which include network bandwidth, latency, CPU utilization, running memory usage, I / O performance and used storage space.

[0074] OSD attributes are divided into two categories: efficiency attributes and non-efficiency attributes. Efficiency attributes are attributes where the larger the value, the better, such as network bandwidth and I / O performance. Non-efficiency attributes are attributes where the smaller the value, the better, such as latency, CPU utilization, running memory usage, and used storage space. Different normalization methods are used for different types of attributes, and the attribute value (measurement value) before normalization is defined as The normalized attribute value is

[0075] For the effect attributes, the following normalization is performed:

[0076]

[0077] For non-effect attributes, the following normalization is performed:

[0078]

[0079] Calculate the ideal solution based on the normalized decision matrix and negative ideal solutions

[0080]

[0081] For incoming collections Each Calculate the Euclidean distance to the ideal solution and the negative ideal solution and

[0082]

[0083] Further, calculate the migration set Each Relative closeness to the ideal solution

[0084]

[0085] The relative proximity Can be used to evaluate the t time slot migration and migration The path weight w between ki (t). For the convenience of description, we further remove the t time slot from the set All the OSDs that have been migrated out and those that have been migrated in All path weights of all migrated OSDs are expressed as a matrix

[0086] 2) Time-triggered KM migration control algorithm

[0087] Assume that the state of migration in time slot t does not change, that is, if time slot t is specified, the migration from Transfer PG to the migration Before reaching time slot t+1, Transfer PGs one by one to the migration The system transmission relationship matrix of time slot t is as follows where z ki (t) indicates moving out and migration The transmission relationship between them:

[0088]

[0089] If time slot t is moved out Transfer PG to the migration The conditions for transmission adjustment or suspension are divided into the following three cases: ① Until the end of time slot t, a new decision is made in time slot t+1. ② Migration within time slot t Transmit all PGs to be transmitted. ③ Migrate in time slot t The storage space utilization rate reaches the system average storage space utilization rate

[0090] The first case ① can be guaranteed by loop decision. To illustrate the second and third cases ② and ③: define time slot entry t The storage space usage is U i (t); t time slot migration To be transferred to the migration The PG size is Its value is related to the judgment condition of the PG to be transferred. Generally, it is required to be transferred before the migration. PG does not exist in the file and is moved out after the transfer The storage space usage rate is not lower than the system average storage space usage rate Migrate out in time slot t Can be transferred to the migration The PG size is Their values ​​are related to the length and status of the path under the time slot and are directly given by the environment during the experiment.

[0091] For the second case ②, it can be expressed as:

[0092]

[0093] For the third case ③, it can be expressed as:

[0094]

[0095] Under the constraints of the above two formulas (19) and (20), the second term in the optimization problem P2 can be guaranteed by step-by-step time slot decision making. Therefore, the optimization problem P2 can be further written into the following time-triggered linear form:

[0096]

[0097] stz ki (t)∈{0,1}

[0098] It's important to note that the constraints in Case 2 (2) and Case 3 (3) can be obtained through loop conditions and do not need to be included in the optimization model. The unconstrained optimization problem P3 can be solved using the KM algorithm, also known as the Hungarian algorithm. This is a relatively simple algorithm whose principles have been discussed in many papers and will not be elaborated on here.

[0099] Based on the above analysis, the OSD migration problem can be solved using Algorithm 1. The algorithm's input includes the system environment. This is because the algorithm designed in this paper runs online in real time and requires real-time interaction with the system environment. The obtained migration strategy is fed back to the system, and the next strategy is formulated by measuring the performance indicators of the system after executing the strategy. This cycle continues until the system reaches the desired state.

[0100]

[0101] In Algorithm 1, the condition of "time reaches the next time slot" in line 7 is because the system is in a state of continuous operation. The algorithm needs to adjust the migration strategy every once in a while to make the system reach the ideal state. It should be noted that the PG transmission in line 11 is not continuous. PG must be transmitted one by one and cannot be divided. During the transmission process, it is necessary to carefully judge whether formula (19) or (20) is satisfied. If it is not satisfied, the transmission needs to be stopped in time. This requires multi-threaded parallel execution. One thread is responsible for the migration of PGs of a migration-in pair to ensure that there is no impact on each other. The ideal state of "OSD reaches the ideal state" in line 14 is that the storage space occupancy rate u of the OSD is i Equal to the system's average storage space usage However, since PG cannot be divided, this is actually difficult to achieve. Therefore, in the implementation process, a threshold ε is given according to the needs. When the OSD storage space occupancy u i Average storage space usage of the system When the difference does not exceed the threshold ε, it is determined that the OSD has reached the ideal state.

[0102] To this end, the present invention proposes a Ceph storage system data migration method based on P4 network telemetry optimization, which includes the following steps:

[0103] Step 1: Use the P4 switch to collect attribute information of the Ceph storage system in the current time slot; the attribute information of the Ceph storage system includes network bandwidth, latency, CPU utilization, running memory usage, I / O performance, and used storage space;

[0104] Step 2: Calculate the OSD storage space occupancy rate of the current time slot and the average storage space occupancy rate of the current time slot system based on the collected attribute information of the current time slot OSD used storage space, that is:

[0105] OSD storage space occupancy u in time slot t i (t) is:

[0106]

[0107] Average storage space occupancy of the system in time slot t for:

[0108]

[0109] Where U i (t) represents the t-time slot OSDO i Used storage space, C i Represents OSDO i The total storage space of Ceph, n represents the total number of OSDs in the Ceph storage system;

[0110] And divide each OSD into the emigration set or the migration set, that is:

[0111] If the OSD storage space occupancy rate in the current time slot is greater than or equal to the system average storage space occupancy rate in the current time slot, it is assigned to the migration set;

[0112] If the OSD storage space occupancy rate in the current time slot is less than the average storage space occupancy rate of the system in the current time slot, it is divided into the migration set;

[0113] Step 3: Use the TOPSIS algorithm to calculate the path weights between each outgoing OSD in the current time slot and each incoming OSD in the incoming set, that is:

[0114] t time slot migration and migration The path weight w between ki (t) is:

[0115]

[0116] Where, Indicates moving out Corresponding migration The measured value of attribute j of Indicates moving out Corresponding migration Normalized value of attribute j, k=1,2,...,n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s represents the number of attributes, max(·) represents the maximization function, and min(·) represents the minimization function;

[0117] For the OSD effect attribute j, the migration Corresponding migration The normalized value of attribute j for:

[0118]

[0119] For the non-effect attribute j of OSD, the migration Corresponding migration The normalized value of attribute j for:

[0120]

[0121] Where, Indicates moving out Corresponding migration The measured value of attribute j, k = 1, 2, ..., n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s Indicates the number of attributes;

[0122] Step 4: Use the KM algorithm to solve the following optimization problem to obtain the transmission relationship between each outgoing OSD in the outgoing set and each incoming OSD in the incoming set in the current time slot; the optimization problem is:

[0123]

[0124] stz ki (t)∈{0,1}

[0125] Where z ki (t) represents the time slot t migration and migration The transmission relationship between ki (t) represents the time slot t migration and migration The path weight between ki (t) = 1 means time slot t is moved out and migration There is a transmission relationship between them, z ki (t) = 0 means time slot t is moved out and migration There is no transmission relationship between n out (t) represents the number of OSDs that have moved out of the set in time slot t, n in (t) represents the number of OSDs that migrated into the set in time slot t;

[0126] Step 5: Based on the transmission relationship between each OSD in the outgoing set and each OSD in the incoming set in the current time slot, each outgoing OSD in the outgoing set transmits the PG to the corresponding incoming OSD in the incoming set. At the same time, in the process of each outgoing OSD transmitting the PG to its corresponding incoming OSD, once the current outgoing OSD has transmitted the PG to be transmitted or the storage space occupancy rate of the current incoming OSD reaches the system average storage space occupancy rate, the transmission is stopped.

[0127] Step 6: When the next time slot arrives, use the P4 switch to collect attribute information of the Ceph storage system in the current time slot; the attribute information of the Ceph storage system includes network bandwidth, latency, CPU utilization, running memory usage, I / O performance, and used storage space;

[0128] Step 7. Calculate the OSD storage space occupancy rate of the current time slot and the system average storage space occupancy rate of the current time slot based on the used storage space of the OSD in the current time slot in the collected attribute information, and determine whether the difference between the storage space occupancy rate of all OSDs in the current time slot and the system average storage space occupancy rate does not exceed the set threshold ε: if so, end the loop; otherwise, go to step 2.

[0129] It should be noted that although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention. Therefore, the present invention is not limited to the above-mentioned specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.

Claims

1. A Ceph storage system data migration method based on P4 network telemetry optimization, characterized by: The steps are as follows: Step 1: Use the P4 switch to collect attribute information of the Ceph storage system in the current time slot; Step 2: Calculate the OSD storage space occupancy rate and the system average storage space occupancy rate of the current time slot based on the collected attribute information of the current time slot OSD used storage space, and divide each OSD into the outgoing set or the incoming set, that is: If the OSD storage space occupancy rate in the current time slot is greater than or equal to the system average storage space occupancy rate in the current time slot, it is assigned to the migration set; If the OSD storage space occupancy rate in the current time slot is less than the average storage space occupancy rate of the system in the current time slot, it is divided into the migration set; Step 3: Use the TOPSIS algorithm to calculate the path weights between each outgoing OSD in the outgoing set and each incoming OSD in the incoming set in the current time slot. Step 4: Use the KM algorithm to solve the following optimization problem to obtain the transmission relationship between each outgoing OSD in the outgoing set and each incoming OSD in the incoming set in the current time slot; the optimization problem is: s.t. z ki (t)∈{0,1} Where z ki (t) represents the time slot t migration and migration The transmission relationship between ki (t) represents the time slot t migration and migration The path weight between ki (t) = 1 means time slot t is moved out and migration There is a transmission relationship between them, z ki (t) = 0 means time slot t is moved out and migration There is no transmission relationship between n out (t) represents the number of OSDs that have moved out of the set in time slot t, n in (t) represents the number of OSDs that migrated into the set in time slot t; Step 5: Based on the transmission relationship between each OSD in the outgoing set and each OSD in the incoming set in the current time slot, each outgoing OSD in the outgoing set transmits the PG to the corresponding incoming OSD in the incoming set. At the same time, in the process of each outgoing OSD transmitting the PG to its corresponding incoming OSD, once the current outgoing OSD has transmitted the PG to be transmitted or the storage space occupancy rate of the current incoming OSD reaches the system average storage space occupancy rate, the transmission is stopped. Step 6: When the next time slot arrives, use the P4 switch to collect the attribute information of the Ceph storage system in the current time slot; Step 7. Calculate the OSD storage space occupancy rate of the current time slot and the system average storage space occupancy rate of the current time slot based on the used storage space of the OSD in the current time slot in the collected attribute information, and determine whether the difference between the storage space occupancy rate of all OSDs in the current time slot and the system average storage space occupancy rate does not exceed the set threshold ε: if so, end the loop; otherwise, go to step 2.

2. The Ceph storage system data migration method based on P4 network telemetry optimization according to claim 1 is characterized in that: Ceph storage system attribute information includes network bandwidth, latency, CPU utilization, running memory usage, I / O performance, and used storage space.

3. The Ceph storage system data migration method based on P4 network telemetry optimization according to claim 1 is characterized in that: OSD storage space occupancy u in time slot t i (t) is: Average storage space occupancy of the system in time slot t for: Where U i (t) represents the t-time slot OSDO i of used storage space, C i Represents OSDO i The total storage space of Ceph, n is the total number of OSDs in the Ceph storage system.

4. The Ceph storage system data migration method based on P4 network telemetry optimization according to claim 1 is characterized in that: t time slot migration and migration The path weight w between ki (t) is: Where, Indicates migration out of OSD Corresponding to the migrated OSD The measured value of attribute j of Indicates migration out of OSD Corresponding to the migrated OSD Normalized value of attribute j, k=1,2,...,n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s represents the number of attributes, max(·) represents the maximization function, and min(·) represents the minimization function.

5. The Ceph storage system data migration method based on P4 network telemetry optimization according to claim 4 is characterized in that: For the effect attribute j of OSD, migrate out of OSD Corresponding to the migrated OSD The normalized value of attribute j for: For the non-effect attribute j of OSD, migrate out of OSD Corresponding to the migrated OSD The normalized value of attribute j for: Where, Indicates migration out of OSD Corresponding to the migrated OSD The measured value of attribute j, k = 1, 2, ..., n out (t), n out (t) represents the number of OSDs that have moved out of the set in time slot t, i = 1, 2, ..., n in (t), n in (t) represents the number of OSDs that migrated into the set in time slot t, j = 1, 2, ..., n s , n s Indicates the number of attributes.

Citation Information

Patent Citations

  • Automatic balanced storage method of Ceph storage system based on hierarchical mapping

    CN111880747A

  • Heterogeneous hybrid load balancing storage method based on Ceph erasure codes

    CN112486418A