Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up and plan PG

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to set up and plan PG", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to set up and plan PG".

Calculate the PG Count formula for a single pool

PoolPGCount= ((TargetPGsPerOSD) ∗ (OSDNumber) ∗ (DataPercent)) / PoolSize

Parameter description name Note Pool PG Count the number of PG per Pool Target PGs Per OSD the number of PGs per OSD a) if the number of OSD in the future cluster is basically no longer growing, Target PGs per OSD = 100

B) if the number of OSD in the future cluster is likely to grow to less than 2 times the current size, Target PGs per OSD = 200

C) if the OSD growth size of the future cluster is more than 2 times and less than 3 times that of the current cluster, Target PGs per OSD is the total number of 300OSD Number cluster OSD. By default, if the SSD and SATA devices are regularly split through CRUSH rules (for example, SSD and SATA are divided into two zone), you need to fill in separately the number of OSD of the corresponding rule, the percentage of the total capacity of the OSD occupied by Data PercentPool (estimated) the replicas size of each pool of Pool Size. The default is 3 if you use the Erasure Coded Pools abbreviation EC pool,Pool Size = karma about the rounding of the calculation results.

The final result of the calculation should be a power of 2. The power of 2 is adopted to improve the efficiency of the CRUSH algorithm.

If the calculated result finds two values of the second power adjacent to the result, if the result exceeds 25% of the value of the smaller second power, the larger second power is selected as the final result, otherwise, the smaller second power value is selected.

Other instructions

The purpose of designing the calculation formula is to ensure that the whole cluster has enough PG to achieve uniform distribution of data on each OSD, and to effectively avoid the problems caused by the high ratio of PG/OSD in Recovery and Backfill.

If there are empty pool or other inactive pool in the cluster, these pool will not affect the data distribution of the existing cluster, but these pool will still consume the memory and CPU resources of the cluster.

Give an example of the environment:

A cluster consists of 100 OSD, of which 40 OSD are SSD (divided into SSD zone through CRUSH rules) and 60 OSD are divided into SATA (divided into SATA zone through CRUSH rules). The size of the cluster is expected to grow to twice the current size in the future.

Demand:

Create 4 new pool for the entire cluster, as shown below:

Name description remarks SSD_poolAPool Size=3, estimated capacity occupancy ratio 60%SSD zoneSSD_poolBPool Size=3, estimated capacity occupancy ratio 40%SSD zoneSATA_poolAEC Pools,Pool Size= km2 = 3, 2, 5, estimated capacity occupancy ratio 80%SATA zoneSATA_poolbPool Size=3, estimated capacity occupancy ratio 20%SATA zone name description remarks SSD_poolA

PoolPGCount= (200) ∗ (40) ∗ (0.6) / 31600 ≈ 2048

The distribution of 1600 and the adjacent second power is 1024.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report