Ceph Learning PG

Source: Internet
Author: User

Calculation formula for PG:

Calculation formula for the entire cluster PG

 

The calculation formula for PG in each pool:

Total PGs = (TOTAL_NUMBER_OF_OSD *)/Max_replication_count/pool_count

The result of the settlement is taken up to the value of the n-th square of the 2. For example, the total number of OSD is 160, the number of copies of the number of 3,pool is also 3, then the result is calculated according to the above formula is 1777.7. Take 2 of the n-th is 2048, then the number of PG allocated per pool is 2048.

When changing the number of PG in a pool, you need to change the number of PGP simultaneously. PGP is a dedicated PG for the management of placement, and it should be consistent with the number of PG. If you increase the pool's pg_num, you need to increase the pgp_num at the same time, keeping them consistent in size so that the cluster can rebalancing normally. The following describes how to modify Pg_num and Pgp_num.

Check the number of PG in POOL2

[Root@mon1 ~]# ceph OSD Pool get pool2 pg_num
pg_num:128
[root@mon1 ~]# ceph OSD Pool get pool2 pgp_num
pgp_n um:128
[Root@mon1 ~]#

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.