A distributed storage system optimization method and system

By presetting executable scripts in the ceph distributed storage system, automatically compute and optimize the number of pg_num/pgp_num, the automation optimization problem of the ceph distributed storage system is solved, and the performance and reliability of the system are improved.

CN115016730BActive Publication Date: 2025-08-26INSPUR COMM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210557313.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-08-26
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

In the prior art, the ceph distributed storage system lacks automated optimization methods in the number setting of pg_num/pgp_num, resulting in system stability and reliability problems.

Method used

By pre-configuring executable scripts, the number of placement groups PGs in the ceph distributed storage system and the number of placement groups PGPs are automatically calculated and optimized. The number of placement groups PGPs in the ceph distributed storage system is deployed, and scripts are deployed on the control nodes using ansible tool to achieve automated estimation and optimization.

Benefits of technology

It improves the performance and reliability of the ceph distributed storage system, avoids the cumbersomeness and uncertainty of manual operations, and improves the system's automation management level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115016730B_ABST
    Figure CN115016730B_ABST
Patent Text Reader

Abstract

The present invention provides a distributed storage system optimization method and system, comprising: obtaining an executable script in the distributed storage system; calling the executable script to obtain information about all pools in the distributed storage system; calculating the information about all pools to obtain the number of placement groups (PGs) and the number of management placement groups (PGPs); and optimizing the pools in the distributed storage system based on the number of PGs and the number of PGPs. The present invention uses a pre-installed executable script to automatically estimate the appropriate number of placement groups and the number of management placement groups, thereby improving the performance and reliability of the distributed storage system and avoiding the tedious and uncertainties of manual operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distributed storage technology, and in particular to an optimization method and system for a distributed storage system. Background Art

[0002] With the large-scale application of Ceph distributed storage technology deployed based on rook-ceph in edge cloud production environments, the rationality of the number of pg_num / pgp_num in the pool of Ceph distributed storage deployed based on rook-ceph, that is, the rationality of the number of placement group PGs and the number of management placement group PGPs, directly affects the performance and reliability of the Ceph distributed storage system.

[0003] In a typical Ceph production environment, the default pg_autoscale_mode setting is pg_autoscale_mode=warn. This setting enables the system to automatically optimize the pg_num / pgp_num counts. Enabling pg_autoscale_mode=on is highly risky. While automatic optimization is possible, it can easily lead to various instabilities in complex production environments, impacting system stability and reliability. Therefore, the default setting of "warn" means that when PG counts need to be adjusted, Ceph only issues health alerts without automatically performing the settings. However, there is no reliable solution for automatically setting appropriate pg_num / pgp_num counts for each Ceph storage pool and then automatically executing the pg_num / pgp_num count settings.

[0004] Therefore, to address the above problems, a new optimization method for distributed storage systems needs to be proposed. Summary of the Invention

[0005] The present invention provides a distributed storage system optimization method and system for solving the defect that there is no corresponding solution for optimizing and setting the number of pg_num / pgp_num of all pools in Ceph distributed storage in the prior art.

[0006] In a first aspect, the present invention provides a method for optimizing a distributed storage system, comprising:

[0007] Obtain the executable script in the distributed storage system;

[0008] Calling the executable script to obtain all pool information in the distributed storage system;

[0009] Calculate all the pool information to obtain the number of placement group PGs and the number of management placement group PGPs;

[0010] The pool in the distributed storage system is optimized based on the number of PGs and the number of PGPs.

[0011] According to a distributed storage system optimization method provided by the present invention, before obtaining the executable script in the distributed storage system, the method further includes:

[0012] Determine the execution script for updating the number of PGs and the execution script for calculating the number of PGs;

[0013] The PG quantity update execution script and the PG quantity calculation execution script are placed in the user root directory of each control node to form the executable script.

[0014] According to a distributed storage system optimization method provided by the present invention, calling the executable script to obtain all pool information in the distributed storage system includes:

[0015] Determine that the PG quantity calculation execution script is called by the PG quantity update execution script;

[0016] The PG quantity calculation execution script obtains the number of object storage devices OSD in up state, all pool names, the number of all pool copies, the original PG number and the original PGP number respectively.

[0017] According to a distributed storage system optimization method provided by the present invention, before calculating all pool information and obtaining the number of placement group PGs and managing the number of placement group PGPs, the method further includes:

[0018] The PG quantity calculation execution script obtains PGs in the distributed storage system that are in active and clean states.

[0019] According to a distributed storage system optimization method provided by the present invention, calculating all pool information to obtain the number of placement group PGs and the number of management placement group PGPs includes:

[0020] Based on the number of OSDs and the number of all pool replicas, the number of PGs and the number of PGPs are calculated.

[0021] According to a distributed storage system optimization method provided by the present invention, after optimizing the pool in the distributed storage system based on the number of PGs and the number of PGPs, the method further includes:

[0022] The script is updated with the specified number of PGs to expand the OSD capacity.

[0023] In a second aspect, the present invention further provides an optimization system for a distributed storage system, comprising:

[0024] An acquisition module is used to obtain executable scripts in a distributed storage system;

[0025] A calling module, configured to call the executable script to obtain all pool information in the distributed storage system;

[0026] A calculation module is used to calculate all the pool information to obtain the number of PGs and PGPs;

[0027] An optimization module is used to optimize the pool in the distributed storage system based on the number of PGs and the number of PGPs.

[0028] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the distributed storage system optimization method as described above is implemented.

[0029] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for optimizing a distributed storage system.

[0030] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the distributed storage system optimization method described above is implemented.

[0031] The distributed storage system optimization method and system provided by the present invention automatically estimate the reasonable number of placement groups and manage the number of placement groups through a preset executable script, thereby improving the performance and reliability of the Ceph distributed storage system and avoiding the tediousness and uncertainty of manual operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] Figure 1 1 is a flow chart of the distributed storage system optimization method provided by the present invention;

[0034] Figure 2 It is a structural diagram of the optimization system of the distributed storage system provided by the present invention;

[0035] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0036] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0037] Figure 1 FIG. 1 is a flow chart of the distributed storage system optimization method provided by the present invention, such as Figure 1 Shown, including:

[0038] Step 100: Obtain an executable script in the distributed storage system;

[0039] Step 200: calling the executable script to obtain all pool information in the distributed storage system;

[0040] Step 300: Calculate all pool information to obtain the number of placement group PGs and the number of management placement group PGPs;

[0041] Step 400: Optimize the pool in the distributed storage system based on the number of PGs and the number of PGPs.

[0042] It should be noted that Ceph, as described in this invention, is an open-source distributed storage system that includes object storage, block devices, and file systems. It offers high reliability, ease of management, and strong scalability, easily handling petabyte and exabyte-level data. Rook is a file, block, and object storage service specifically designed for Cloud-Native environments. It implements an automatically managed, automatically scalable, and automatically repairable distributed storage service. Rook supports Ceph storage, and using Rook on Kubernetes greatly simplifies the setup and use of Ceph storage clusters.

[0043] Ceph is an object-based storage system that divides each data stream (such as files) to be managed into one or more fixed-size objects, using them as atomic units to complete data reading and writing. It generally includes the following concepts:

[0044] Object: It is the smallest storage unit of Ceph. Its size can be defined by yourself, usually 2M or 4M. Each Object contains a unique identifier OID within the cluster, binary data, and metadata consisting of a set of key-value pairs. OID is generated by ino and ono. Ino is the file id of the file, which is used to globally identify each file, and ono is the number of the shard. Regardless of whether the upper layer application is RBD, CephFS or RADOSGW, it will eventually be stored on the object storage device (Object-based Storage Device, OSD) in the form of an Object. When RADOS receives a data write request from the client, it converts the received data into an Object, and then the OSD daemon writes the data to a file on the OSD file system.

[0045] Pool: A pool is a logical grouping of objects in Ceph. It consists of several placement groups (PGs). Its attributes include owner and access permissions, object replica count, number of PGs, and CRUSH rule sets. Users can set optimization policies for different pools, such as the number of PG replicas, data scrubbing times, and data block and object sizes. When writing data to a pool, the CRUSH map first finds the rule set corresponding to the pool. This rule set describes the number of replicas for the pool. When deploying a Ceph cluster, the data, metadata, and rbd pools are created by default.

[0046] Specifically, the present invention provides a Ceph distributed storage system deployed based on rook-ceph. First, an executable script is pre-installed in the system. According to the number of OSDs in the distributed storage system and the number of replicas of all pools, the reasonable pg_num / pgp_num number of each pool is automatically calculated. Then, according to the calculated pg_num / pgp_num number, the pg_num / pgp_num method of all pools in the rook-ceph system is automatically optimized, thereby improving the performance and reliability of the Ceph distributed storage system deployed based on rook-ceph.

[0047] Rook is not a distributed storage system itself, but rather leverages the power of the Kubernetes platform to provide services for each storage provider through a Kubernetes Operator. It is a storage "orchestrator" that abstracts away much of the complexity by performing the heavy lifting of managing storage using various backends (such as Ceph and EdgeFS). Rook transforms distributed storage systems into self-managing, self-scaling, and self-healing storage services. It automates the tasks of a storage administrator: deployment, bootstrapping, configuration, provisioning, scaling, upgrades, migration, disaster recovery, monitoring, and resource management. Rook orchestrates multiple storage solutions, each with a dedicated Kubernetes Operator for automated management. Currently, Ceph, Cassandra, and NFS are supported. Ceph is the most popular backend, providing more than just block storage; it also offers S3 / Swift-compatible object storage and a distributed file system. Ceph can distribute a volume's data across multiple disks, allowing a volume to effectively use more disk space than a single disk, which is convenient. When more disks are added to the cluster, it automatically rebalances and redistributes data across the disks.

[0048] The present invention automatically estimates the reasonable number of placement groups and manages the number of placement groups through a preset executable script, thereby improving the performance and reliability of the Ceph distributed storage system and avoiding the tediousness and uncertainty of manual operations.

[0049] Based on the above embodiment, before obtaining the executable script in the distributed storage system, the method further includes:

[0050] Determine the execution script for updating the number of PGs and the execution script for calculating the number of PGs;

[0051] The PG quantity update execution script and the PG quantity calculation execution script are placed in the user root directory of each control node to form the executable script.

[0052] Specifically, the present invention uses the automation tool Ansible on the deployment node to copy the PG number update execution script rook_ceph_pg_num_update.sh and the PG number calculation execution script rook_ceph_pg_num_cal.py to the user root directory / usr / bin of each edge cloud control node to form an executable script. Here, the preset executable script is also an executable script specially set for optimization in the present invention.

[0053] It should be noted that Ansible is a typical automated operation and maintenance tool developed based on Python. It combines the advantages of many operation and maintenance tools (puppet, cfengine, chef, func, fabric), and realizes functions such as batch system configuration, batch program deployment, and batch command execution.

[0054] The / usr / bin directory is usually used to store the running scripts of some software installed later. It mainly contains the necessary application software tools and executes files such as c++, g++, gcc, chdrv, diff, dig, du, eject, elm, free, gnome*, gzip, htpasswd, kfm, ktop, last, less, locale, m4, make, man, mcopy, ncftp, newaliases, nslookuppasswd, quota, smb*, wget, etc.

[0055] The .py file corresponding to the executable script file can be regarded as a module, which is similar to the encapsulated class library in other languages

[0056] The present invention pre-sets a specific executable script in the user root directory of each control node through a batch deployment tool, which is used to automatically perform rational resource estimation when deploying nodes later, and has the advantages of high efficiency and high accuracy.

[0057] Based on any of the above embodiments, the calling of the executable script to obtain all pool information in the distributed storage system includes:

[0058] Determine that the PG quantity calculation execution script is called by the PG quantity update execution script;

[0059] The PG quantity calculation execution script obtains the number of object storage devices OSD in up state, all pool names, the number of all pool copies, the original PG number and the original PGP number respectively.

[0060] Specifically, when the edge cloud system deployment is nearing completion, the rook_ceph_pg_num_update.sh automation script can be executed without entering the rook-ceph-tools container. That is, after each edge cloud component has created its own pool on the rook-ceph distributed system, the / usr / bin / rook_ceph_pg_num_update.sh script is executed, and rook_ceph_pg_num_update.sh automatically calls / usr / bin / rook_ceph_pg_num_cal.py.

[0061] After rook-ceph is installed, rook_ceph_pg_num_cal.py retrieves information about all pools created by other OpenStack components, automatically obtaining the number of OSDs in the up state, the names of all pools, the number of all pool replicas, the original pg_num number, and the original pgp_num number.

[0062] Typically, OSD has the following states:

[0063] In the cluster (in), out of the cluster (out), alive and running (up), and down and no longer running (down). Under normal circumstances, the OSD state is up in. If the OSD is shut down, its state will change to down in. After data balancing is completed, the OSD state changes to down out. Ceph will migrate its placement group to other OSDs, and CRUSH will no longer assign placement groups to it.

[0064] The present invention automatically queries all pool information in the Ceph distributed storage by calling a preset executable script, thereby obtaining sufficient input information for optimizing resource configuration in the estimation system.

[0065] Based on any of the above embodiments, before calculating all pool information and obtaining the number of placement group PGs and the number of management placement group PGPs, the method further includes:

[0066] The PG quantity calculation execution script obtains PGs in the distributed storage system that are in active and clean states.

[0067] The step of calculating all pool information to obtain the number of placement group PGs and the number of management placement group PGPs includes:

[0068] Based on the number of OSDs and the number of all pool replicas, the number of PGs and the number of PGPs are calculated.

[0069] Specifically, before automatic estimation, rook_ceph_pg_num_cal.py obtains the status information of all pgs in the rook-ceph environment to see whether they are active+clean.

[0070] The normal PG status is 100% active+clean, which means that all PGs are accessible and all replicas are available to all PGs. If Ceph also reports other warning or error status for the PG. The PG status table includes: Status Description Activating Peering has completed and the PG is waiting for all PG instances to synchronize and solidify the peering results (Info, Log, etc.) Active state. The PG can normally process read and write requests from clients Backfilling In the background filling state. Backfill is a special scenario of recovery. After peering is completed, if the current authoritative log cannot be used to perform incremental synchronization of some PG instances in the Up Set (for example, the OSD hosting these PG instances has been offline for too long, or a new OSD has joined the cluster, causing the entire PG instance to be migrated), a full synchronization is performed by completely copying all objects from the current Primary Backfill-toofull A PG instance that needs to be backfilled has insufficient available space on its OSD, and the backfill process is currently suspended Backfill-wait Waiting for backfill resources to be reserved Clean state. PG currently has no objects to be repaired, the Acting Set and Up Set contents are consistent, and the size is equal to the number of replicas in the storage pool. CreatingPG is being created. DeepPG is or will be performing an object consistency scan and cleaning. Degraded state. After Peering is completed, PG detects that any PG instance has inconsistent objects (needs to be synchronized / repaired), or the current ActingSet is less than the number of replicas in the storage pool. During DownPeering, PG detects that during a certain interval that cannot be skipped (for example, during this interval, PG completed Peering and successfully switched to the active state, which may have processed read and write requests from the client normally). The current remaining online OSDs are insufficient to complete data repair. During IncompletePeering, due to a. the authoritative log is not selected and b. the ActingSet selected by choose_acting is subsequently insufficient to complete data repair, resulting in Peering not being completed normally. Inconsistent state. After cluster cleanup and deep cleanup, inconsistencies were detected in object replicas in the PG. For example, inconsistent object file sizes or a replica of an object was lost after recovery. Peered Peering has completed, but the PG's current ActingSet size is less than the minimum number of replicas (min_size) specified by the storage pool. Peering is in the synchronizing state. PG is in the synchronizing state. Recovering is in the recovering state.The cluster is performing a migration or synchronization of objects and their replicas. Recovering-wait Waiting for Recovery resources to be reserved. Remapped remapped state. Any change in the PG active set causes data to be migrated from the old active set to the new active set. During the migration, the primary OSD in the old active set is still used to handle client requests. Once the migration is completed, the primary OSD in the new active set begins to process RepairPG. During the Scrub process, if inconsistent objects are found and can be repaired, the repair state is automatically entered. ScrubbingPG is or is about to perform an object consistency scan. Unactive inactive state. PG cannot process read and write requests. Unclean non-clean state. PG cannot recover from the previous failure. Stale unrefreshed state. The PG status has not been updated by any OSD, which means that all OSDs storing this PG may have crashed, or Mon has not detected Primary statistics (network jitter). UndersizedPG's current Acting Set is less than the number of storage pool replicas.

[0071] Furthermore, rook_ceph_pg_num_cal.py automatically optimizes the pool settings based on the estimated pg_num and pgp_num numbers, and returns the optimization results to the end user after the automated execution is completed.

[0072] The present invention proposes a method for automatically completing a reasonable estimation of the number of PGs and PGPs through a preset executable script, and automatically feeding back the optimization result to the user, which has the characteristics of high real-time performance and high execution efficiency of batch processing.

[0073] Based on any of the above embodiments, after optimizing the pool in the distributed storage system based on the number of PGs and the number of PGPs, the method further includes:

[0074] The script is updated with the specified number of PGs to expand the OSD capacity.

[0075] Optionally, after completing the system optimization, the operation and maintenance personnel can also expand the OSD of rook-ceph and manually execute the script / usr / bin / rook_ceph_pg_num_update.sh to optimize the pg_num and pgp_num of all pools on the rook-ceph distributed system again. There is no need to manually estimate and manually set the pg_num and pgp_num of each pool. After the automated execution is completed, the optimization results are returned to the operation and maintenance personnel.

[0076] Here, in addition to realizing resource optimization configuration in the system deployment phase, the present invention can also make dynamic adjustments according to actual needs in the later operation and maintenance phase. The operation and maintenance personnel can directly execute rook_ceph_pg_num_update.sh on the control node like executing a command to automatically optimize the pg_num and pgp_num numbers of the distributed storage pool.

[0077] The present invention realizes dynamic adjustment of operation and maintenance in the later stage by presetting executable scripts in the deployment stage during the operation and maintenance stage, without the need to develop new maintenance scripts separately, and has the characteristics of simple implementation and convenient execution.

[0078] The distributed storage system optimization system provided by the present invention is described below. The distributed storage system optimization system described below and the distributed storage system optimization method described above can refer to each other.

[0079] Figure 2 This is a schematic diagram of the structure of the optimization system of the distributed storage system provided by the present invention. Figure 2 As shown, it includes: an acquisition module 21, a call module 22, a calculation module 23 and an optimization module 24, wherein:

[0080] The acquisition module 21 is used to obtain the executable script in the distributed storage system; the calling module 22 is used to call the executable script to obtain all pool information in the distributed storage system; the calculation module 23 is used to calculate all the pool information to obtain the number of PGs and the number of PGPs; the optimization module 24 is used to optimize the pool in the distributed storage system based on the number of PGs and the number of PGPs.

[0081] The present invention automatically estimates the reasonable number of placement groups and manages the number of placement groups through a preset executable script, thereby improving the performance and reliability of the Ceph distributed storage system and avoiding the tediousness and uncertainty of manual operations.

[0082] Figure 3 An example of a physical structure diagram of an electronic device is shown below. Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 330 to execute a distributed storage system optimization method, which includes: obtaining an executable script in the distributed storage system; invoking the executable script to obtain information about all pools in the distributed storage system; calculating the information about all pools to obtain the number of placement groups (PGs) and the number of management placement groups (PGPs); and optimizing the pools in the distributed storage system based on the number of PGs and the number of PGPs.

[0083] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as 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.

[0084] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the distributed storage system optimization method provided by the above methods, which includes: obtaining an executable script in the distributed storage system; calling the executable script to obtain all pool information in the distributed storage system; calculating all pool information to obtain the number of placement group PGs and the number of management placement group PGPs; and optimizing the pool in the distributed storage system based on the number of PGs and the number of PGPs.

[0085] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the distributed storage system optimization method provided by the above methods, the method comprising: obtaining an executable script in the distributed storage system; calling the executable script to obtain all pool information in the distributed storage system; calculating all pool information to obtain the number of placement group PGs and the number of management placement group PGPs; and optimizing the pools in the distributed storage system based on the number of PGs and the number of PGPs.

[0086] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0087] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A distributed storage system optimization method, characterized in that: include: Obtain the executable script in the distributed storage system; Calling the executable script to obtain all pool information in the distributed storage system, including: determining that the PG quantity update execution script calls the PG quantity calculation execution script; Calculate all the pool information to obtain the number of placement group PGs and the number of management placement group PGPs; Optimizing a pool in the distributed storage system based on the number of PGs and the number of PGPs; Before obtaining the executable script in the distributed storage system, the method further includes: Determine the PG quantity update execution script and the PG quantity calculation execution script; place the PG quantity update execution script and the PG quantity calculation execution script into the user root directory of each control node to form the executable script; After optimizing the pool in the distributed storage system based on the number of PGs and the number of PGPs, the method further includes: The OSD is expanded by using the PG quantity update execution script, including: expanding the OSD of the distributed storage system, manually executing the PG quantity update execution script, and optimizing the PG quantity and the PGP quantity of all pools on the distributed storage system again.

2. The distributed storage system optimization method according to claim 1, characterized in that: The calling of the executable script to obtain all pool information in the distributed storage system includes: The PG quantity calculation execution script obtains the number of object storage devices OSD in active up state, all pool names, the number of all pool copies, the original PG number and the original PGP number respectively.

3. The distributed storage system optimization method according to claim 2, characterized in that: Before calculating all pool information and obtaining the number of placement group PGs and the number of management placement group PGPs, the method further includes: The PG quantity calculation execution script obtains PGs in the distributed storage system that are in active state and clean state.

4. The distributed storage system optimization method according to claim 2, characterized in that: The calculation of all pool information to obtain the number of placement group PGs and the number of management placement group PGPs includes: Based on the number of OSDs and the number of all pool replicas, the number of PGs and the number of PGPs are calculated.

5. A distributed storage system optimization system, characterized in that: include: An acquisition module is used to obtain executable scripts in a distributed storage system; A calling module is used to call the executable script to obtain all pool information in the distributed storage system, including: determining that the PG quantity update execution script calls the PG quantity calculation execution script; A calculation module is used to calculate all the pool information to obtain the number of PGs and PGPs; An optimization module, configured to optimize the pool in the distributed storage system based on the number of PGs and the number of PGPs; Before obtaining the executable script in the distributed storage system, the method further includes: Determine the PG quantity update execution script and the PG quantity calculation execution script; place the PG quantity update execution script and the PG quantity calculation execution script into the user root directory of each control node to form the executable script; After optimizing the pool in the distributed storage system based on the number of PGs and the number of PGPs, the method further includes: The OSD is expanded by using the PG quantity update execution script, including: expanding the OSD of the distributed storage system, manually executing the PG quantity update execution script, and optimizing the PG quantity and the PGP quantity of all pools on the distributed storage system again.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the distributed storage system optimization method according to any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the distributed storage system optimization method according to any one of claims 1 to 4 is implemented.

8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the distributed storage system optimization method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Deployment method and device of distributed storage system

    CN110989923A