Ceph-based element selection method, device, server and storage medium
An element and cache technology, applied in the field of distributed databases, can solve the problem of unbalanced OSD distribution of items, etc., and achieve the effect of reducing time complexity and excellent performance
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0028] figure 1 It is a flow chart of the CEPH-based element selection method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of selecting elements in the CEPH distributed database. The method can be distributed by the data of multiple storage pools based on CEPH device, and can be integrated in the ceph server, which specifically includes the following steps:
[0029] S110, calculate the product result of the CRUSH_HASH input parameters, the CRUSH_HASH input parameters include: bucket x, bucket id and selection times r.
[0030] In the ceph distributed database, buckets are used to represent the intermediate nodes of the hierarchical structure, and the leaf nodes are the corresponding OSDs. Each type of bucket uses a different data structure to organize its contents, which can be other Buckets or OSDs.
[0031] In the ceph distributed database, osd is equivalent to the physical storage unit of PG, and the OSD corresponding t...
Embodiment 2
[0047] figure 2 It is a schematic flowchart of the CEPH-based element selection method provided in Embodiment 2 of the present invention. This embodiment is optimized on the basis of the foregoing embodiments. In this embodiment, the method may further include the following step: caching the CRUSH_HASH input parameter and the product result corresponding to the CRUSH_HASH input parameter.
[0048] Correspondingly, the CEPH-based element selection method provided in this embodiment specifically includes:
[0049] S210, calculate the product result of the CRUSH_HASH input parameters, the CRUSH_HASH input parameters include: bucket x, bucket id and selection times r.
[0050] S220. Using the product result as a random number seed, use the MT19937 algorithm to generate a 32-bit pseudo-random number rand corresponding to the number of items included in the bucket.
[0051] S230. Calculate the product of the weight ratio of the pseudo-random number and its corresponding item, and...
Embodiment 3
[0063] image 3 It is a schematic structural diagram of a CEPH-based multi-storage pool data distribution device provided in Embodiment 3 of the present invention, as shown in image 3 As shown, the device includes:
[0064] The calculation module 310 is used to calculate the product result of the CRUSH_HASH input parameters, the CRUSH_HASH input parameters include: bucket x, bucket id and selection times r;
[0065] Pseudo-random number generating module 320, for using the product result as a random number seed, using the MT19937 algorithm to generate a 32-bit pseudo-random number rand corresponding to the number of items included in the bucket;
[0066] The selection module 330 is configured to calculate the product of the weight ratio of the pseudo-random number and the corresponding item, and determine the selected item according to the result of the product.
[0067] The CEPH-based multi-storage pool data distribution device provided in this embodiment calculates the pr...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com