Re: PG Calculations Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I believe the question was in regards to which formula to use. There are two different formulas here [1] and here [2].

The difference being the additional steps used to calculate the appropriate PG counts for a pool. In Nautilus though, this mostly moot as the mgr service now has a module to automatically scale PG's. It would be great to see how this could be back ported to Mimic or Luminous though. 😉

[1]
(this one is used by the PGCalc _javascript_)

[2]



From: ceph-users <ceph-users-bounces@xxxxxxxxxxxxxx> on behalf of David Turner <drakonstein@xxxxxxxxx>
Sent: Thursday, February 28, 2019 10:34 PM
To: Krishna Venkata
Cc: ceph-users
Subject: Re: [ceph-users] PG Calculations Issue
 
Those numbers look right for a pool only containing 10% of your data. Now continue to calculate the pg counts for the remaining 90% of your data.

On Wed, Feb 27, 2019, 12:17 PM Krishna Venkata <kvenkata986@xxxxxxxxx> wrote:

Greetings,


I am having issues in the way PGs are calculated in https://ceph.com/pgcalc/ [Ceph PGs per Pool Calculator ] and the formulae mentioned in the site.

Below are my findings

The formula to calculate PGs as mentioned in the https://ceph.com/pgcalc/ :

1.      Need to pick the highest value from either of the formulas

(( Target PGs per OSD ) x ( OSD # ) x ( %Data ))/(size)

Or

( OSD# ) / ( Size )

2.      The output value is then rounded to the nearest power of 2

  1. If the nearest power of 2 is more than 25% below the original value, the next higher power of 2 is used.

 

Based on the above procedure, we calculated PGs for 25, 32 and 64 OSDs

Our Dataset:

%Data: 0.10

Target PGs per OSD: 100

OSDs 25, 32 and 64

 

For 25 OSDs

 

(100*25* (0.10/100))/(3) = 0.833

 

( 25 ) / ( 3 ) = 8.33

 

1. Raw pg num 8.33  ( Since we need to pick the highest of (0.833, 8.33))

2. max pg 16 ( For, 8.33 the nearest power of 2 is 16)

3. 16 > 2.08  ( 25 % of 8.33 is 2.08 which is more than 25% the power of 2)

 

So 16 PGs

ü  GUI Calculator gives the same value and matches with Formula.

 

For 32 OSD

 

(100*32*(0.10/100))/3 = 1.066

( 32 ) / ( 3 ) = 10.66

 

1. Raw pg num 10.66 ( Since we need to pick the highest of (1.066, 10.66))

2. max pg 16 ( For, 10.66 the nearest power of 2 is 16)

3.  16 > 2.655 ( 25 % of 10.66 is 2.655 which is more than 25% the power of 2)

 

So 16 PGs

û  GUI Calculator gives different value (32 PGs) which doesn’t match with Formula.

 

For 64 OSD

 

(100 * 64 * (0.10/100))/3 = 2.133

( 64 ) / ( 3 ) 21.33

 

1. Raw pg num 21.33 ( Since we need to pick the highest of (2.133, 21.33))

2. max pg 32 ( For, 21.33 the nearest power of 2 is 32)

3. 32 > 5.3325 ( 25 % of 21.33 is 5.3325 which is more than 25% the power of 2)

 

So 32 PGs

û  GUI Calculator gives different value (64 PGs) which doesn’t match with Formula.

 

We checked the PG calculator logic from [ https://ceph.com/pgcalc_assets/pgcalc.js ] which is not matching from above formulae.

 

Can someone Guide/reference us to correct formulae to calculate PGs.

 

Thanks in advance.  

 

Regards,

Krishna Venkata 

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux