CEPH placement group distribution method and device, server and storage medium
An allocation method and a technology for placing groups, which are applied in the field of distributed databases and can solve the problems of not considering the actual storage situation of each OSD and affecting performance, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0027] figure 1 It is a schematic flowchart of the CEPH placement group allocation method provided by Embodiment 1 of the present invention. This embodiment is applicable to the allocation of placement groups PG in the CEPH distributed system, and the method can be executed by the allocation device of the CEPH placement group , and can be integrated in the CEPH distributed database server, specifically including the following steps:
[0028] S110. Read the affinity value of each OSD and the storage pool corresponding to the placement group to be allocated, where the affinity value is used to represent the storage capacity of the storage pool corresponding to the OSD.
[0029] In order to facilitate the management of data distribution, the system will first create a storage pool, and then the storage pool will be divided into multiple PGs.
[0030] The full name of PG is Placement Groups, which is translated into Chinese as a placement group. It is a carrier for placing object...
Embodiment 2
[0045] figure 2 It is a schematic flowchart of the CEPH placement group allocation method provided in Embodiment 2 of the present invention. In this embodiment, the method may further include the following step: adjusting the affinity of the OSD.
[0046] Correspondingly, the CEPH placement group allocation method provided by the embodiment of the present invention includes:
[0047] S210. Read the affinity value of each OSD and the storage pool corresponding to the placement group to be allocated, where the affinity value is used to represent the storage capacity of the storage pool corresponding to the OSD.
[0048] S220. Determine a mapping OSD according to the affinity value, and correspondingly assign the mapping OSD to the placement group.
[0049] S230, adjusting the affinity of the OSD.
[0050] After the OSD corresponding to the PG is allocated storage, the storage capacity of the mapped OSD changes accordingly. Obviously, after the PG is mapped to the OSD, part o...
Embodiment 3
[0054] image 3 It is a schematic flowchart of the allocation method of the CEPH placement group provided by the third embodiment of the present invention. This embodiment is optimized on the basis of the above-mentioned embodiment, and the affinity of the OSD will be adjusted according to the assigned PG. The specific optimization is: calculate The average PG number avg_sum allocated to the unit capacity of the entire pool; calculate the average PG number avg_self of the unit capacity of the OSD; for OSDs with avg_self greater than avg_sum, adjust their corresponding affinity downwards.
[0055] S310. Read the affinity value of each OSD and the storage pool corresponding to the placement group to be allocated, where the affinity value is used to represent the storage capacity of the storage pool corresponding to the OSD.
[0056] S320. Determine a mapping OSD according to the affinity value, and correspondingly assign the mapping OSD to the placement group.
[0057] S330. Ca...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


