|
|
楼主 |
发表于 2023-1-9 09:07:39
|
显示全部楼层
调整pool的pg数之后我们观察到的变化如下:
: z) D2 G4 Q& D1 R[root@ceph1 ~]# ceph osd pool set default.rgw.meta pg_num 64, L8 [$ M$ y/ p Z8 {, q/ U# }
set pool 5 pg_num to 64
( S2 [9 Y) Q7 O! C) @2 e[root@ceph1 ~]# ceph osd pool set default.rgw.meta pgp_num 64
6 R K% \& g* ^1 M6 qset pool 5 pgp_num to 64
{$ Y+ G! c d
: e7 Q' i/ k1 v" L- R7 ?; J9 T, o此时的状态:: j% ?/ G: |& f% `- A- w
[root@ceph1 ~]# ceph -s
1 H5 m% [ q" K- J& P cluster: w! ^. W8 G7 d* U+ i- p
id: 433d3d2a-8e4a-11ed-b84b-000c293772975 `' c7 j& Q& W- D5 I: Y- z
health: HEALTH_OK
' f) u9 U Y6 \0 [3 m- {- A5 J* r) `& l8 }2 G4 r$ U2 i# g& N5 ^8 a
services:6 t( J v+ |6 t4 ~
mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 4m)9 Q7 U5 U( o: }* ~( B4 H
mgr: ceph2.twhubv(active, since 3m), standbys: ceph1.zmducz, ceph3.dkkmft& k# {! c: a3 L$ j8 n2 O1 A/ Y. ?
mds: cephfs:1 {0=cephfs.ceph3.idylsu=up:active} 1 up:standby
a6 D0 t7 y+ H( \3 c osd: 3 osds: 3 up (since 3m), 3 in (since 11h)( T2 k" ~$ @4 x$ F# N) o
rgw: 3 daemons active (ceph1, ceph2, ceph3)
0 C6 `% K( V+ c/ ?- J. Y9 l, D4 |4 b5 i# O1 `
task status:8 ^1 \' F. Z* j- M0 y+ k
/ L. w- A4 ]! X9 e5 ^ data:; F, z4 _9 I+ R6 I; M6 {, \* G
pools: 8 pools, 233 pgs) Q( |7 x2 U+ X Q% l
objects: 240 objects, 157 KiB& ~: T Q1 b& v
usage: 3.0 GiB used, 57 GiB / 60 GiB avail
7 G7 L+ ^5 m1 |4 n) h- c pgs: 233 active+clean% k7 L; l$ ?2 R0 j5 l/ J
3 ~1 d s2 T9 D5 H
" G: v9 m- ^( X; z& B' G1 K. e, E0 p' j/ Y
" b1 P' H L; Y u9 h+ `* Epgs到达某个值:0 u+ s! M/ B* H/ ~* j0 y7 J7 {
# h# D8 y O0 M O7 g
7 v% m" R' v- x- e' H4 J
查看pool池的详细记录:% [# n, ^1 w# M+ \! i# E4 p" n
5 b: M; G5 U- k& K& ?/ X0 B' X* T[root@ceph1 ~]# ceph osd pool ls detail 9 [, D9 p. j' E# q ~. W
pool 1 'device_health_metrics' replicated size 2 min_size 1 crush_rule 0 object_hash rjenkins pg_num 1 pgp_num 1 autoscale_mode on last_change 375 flags hashpspool,selfmanaged_snaps stripe_width 0 pg_num_min 1 application mgr_devicehealth+ h5 b3 M+ Q$ L0 \5 h8 `
pool 2 '.rgw.root' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 35 flags hashpspool stripe_width 0 application rgw- H" h- e; `3 S, X$ U
pool 3 'default.rgw.log' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 37 flags hashpspool stripe_width 0 application rgw
: D. H0 z( K7 a+ n/ D C) apool 4 'default.rgw.control' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 39 flags hashpspool stripe_width 0 application rgw
0 O) M5 H" ]; T( N- tpool 5 'default.rgw.meta' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 64 pgp_num 64 autoscale_mode on last_change 381 lfor 0/156/379 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 8 application rgw5 |# U, k q" f9 q4 L" J
pool 6 'cephfs.cephfs.meta' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 377 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 16 recovery_priority 5 application cephfs
4 C* s; f" O& W+ O5 L; spool 7 'cephfs.cephfs.data' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 163 flags hashpspool stripe_width 0 application cephfs
5 Y i1 G) O+ \$ L& Ypool 8 'default.rgw.buckets.index' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 8 pgp_num 8 autoscale_mode on last_change 297 lfor 0/297/295 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 8 application rgw
! \6 B6 A* _1 q& d; U/ |/ E0 D2 v. I
发生变化,pg开始下降:
4 {$ P# i4 U4 G[root@ceph1 ~]# ceph osd pool ls detail
/ G+ b; b; s2 N; p* c3 Ypool 1 'device_health_metrics' replicated size 2 min_size 1 crush_rule 0 object_hash rjenkins pg_num 1 pgp_num 1 autoscale_mode on last_change 375 flags hashpspool,selfmanaged_snaps stripe_width 0 pg_num_min 1 application mgr_devicehealth
! b! \: L. \7 F2 @' a- Ppool 2 '.rgw.root' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 35 flags hashpspool stripe_width 0 application rgw0 w2 L2 F# D5 i4 O" z
pool 3 'default.rgw.log' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 37 flags hashpspool stripe_width 0 application rgw
3 ?6 j5 F/ l: P! hpool 4 'default.rgw.control' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 39 flags hashpspool stripe_width 0 application rgw
0 p1 A* T1 g3 ?' V) t1 fpool 5 'default.rgw.meta' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 61 pgp_num 59 pg_num_target 8 pgp_num_target 8 autoscale_mode on last_change 400 lfor 0/400/398 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 8 application rgw! S" ]5 {) n/ w4 y! h! g
pool 6 'cephfs.cephfs.meta' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 377 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 16 recovery_priority 5 application cephfs4 U9 o t& a1 N
pool 7 'cephfs.cephfs.data' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode on last_change 163 flags hashpspool stripe_width 0 application cephfs
, W2 _% {1 q& Qpool 8 'default.rgw.buckets.index' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 8 pgp_num 8 autoscale_mode on last_change 297 lfor 0/297/295 flags hashpspool stripe_width 0 pg_autoscale_bias 4 pg_num_min 8 application rgw, m. ]( N! H* P$ V+ k
' X# I. H% Y1 c3 q状态pgs也在下降:3 {5 m: O& s0 V6 o2 B- k7 I
[root@ceph1 ~]# ceph -s
2 C( o8 P: K: u0 s+ b cluster:7 J4 h8 L9 q8 T1 Q7 x8 u9 `/ O
id: 433d3d2a-8e4a-11ed-b84b-000c293772974 X! T5 [: o/ o$ Y+ l. b' `
health: HEALTH_OK
1 u% Y+ Z# U% C) J- s D ' V# T- `) n! u/ u, o
services:
: m2 U) j1 q6 g) A mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 5m)
( x* y+ `. |9 O mgr: ceph2.twhubv(active, since 4m), standbys: ceph1.zmducz, ceph3.dkkmft
. G( r! r9 N' [6 i4 ^8 Z mds: cephfs:1 {0=cephfs.ceph3.idylsu=up:active} 1 up:standby2 }; g% a* Q4 ^' I1 I7 [( f
osd: 3 osds: 3 up (since 4m), 3 in (since 11h)
# Z9 u& m1 b4 t' \' n7 e rgw: 3 daemons active (ceph1, ceph2, ceph3); @4 t: L! }6 {! h2 b5 R
$ e( i1 M% e k7 r
task status: a, \8 B' r% C- F
% s: G) U5 t/ n9 M" b* X1 K- }
data:8 g! M2 E! a5 D3 x; E* k6 \& G
pools: 8 pools, 228 pgs
* G7 m5 _6 @5 R e w objects: 240 objects, 157 KiB, S3 ~' x& y0 i2 M: \
usage: 3.0 GiB used, 57 GiB / 60 GiB avail9 z$ q% T/ F- h+ h7 y+ i! B
pgs: 228 active+clean- R, R" A ^ n( L: g; B
1 Q" H |. g: ]% ]2 y& B3 B0 _" T$ l progress:1 Z2 Y- v8 t/ [) Z/ o
PG autoscaler decreasing pool 5 PGs from 64 to 8 (0s)8 w6 v, R& U+ e
[............................] % E0 [5 V" h3 E4 J
. q. T7 E( k* w$ \- a- w: y9 X. Z[root@ceph1 ~]# ceph -s
6 ]9 F( F6 [/ B( C( A( U. {2 r cluster:1 X& n; @ C# A# h, b7 B
id: 433d3d2a-8e4a-11ed-b84b-000c29377297; Z5 p) a; u3 D$ {8 V0 V
health: HEALTH_OK* @ R/ H% I* Y" i0 f
8 |! \+ {1 @( [5 w services:
! b6 D! a6 i7 N2 Q: Z0 y& I& ~ mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 5m)
; P) V* b* Y. E4 S( C$ r mgr: ceph2.twhubv(active, since 4m), standbys: ceph1.zmducz, ceph3.dkkmft
* H* f; S( |& \! E mds: cephfs:1 {0=cephfs.ceph3.idylsu=up:active} 1 up:standby
. k0 [2 W+ Q/ U" y! ` osd: 3 osds: 3 up (since 4m), 3 in (since 11h)
! _( }: K+ b( _/ [% x rgw: 3 daemons active (ceph1, ceph2, ceph3)# q8 c, ^8 w/ U; e3 I0 }
5 J3 o* d' E8 T: X H, t) U
task status:) S4 R2 E. c0 r* P& R
4 g8 q" j' k" A- z6 |) h( E
data:1 ]4 W4 Y4 z; C' } O6 y
pools: 8 pools, 228 pgs+ b: z8 k- g( F8 {! j
objects: 240 objects, 157 KiB4 P9 B/ D' Z% o, V+ N. D
usage: 3.0 GiB used, 57 GiB / 60 GiB avail$ j. Y; Y* `; s& O, ^
pgs: 228 active+clean% R1 h3 T) E# S- q4 }+ H
4 e# H) C( @4 H. e# y progress:- c& M9 i' p, q7 f5 I
PG autoscaler decreasing pool 5 PGs from 64 to 8 (0s)3 v. ]- S4 N1 g
[............................]
. @! o+ f( r. Y2 n( Z+ M2 r! V" q q) ~ ( h1 d, w5 H" y/ `
- w4 l: H1 O# P- O7 F0 n
/ o8 |- C; _0 N, f等待同步一会
! T, I4 V$ T# t% ` L4 w' I[root@ceph1 ~]# ceph -s; x7 b: u# \' s0 u
cluster:3 a/ V5 Z: Z* N$ j; c
id: 433d3d2a-8e4a-11ed-b84b-000c29377297
. X% g$ T9 n: A health: HEALTH_OK* c: A, _) p8 D) a$ G# u7 V
/ a2 j4 o b8 G$ Z6 {# C) q services:
" b* f: H0 W+ F mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 10m)
a2 u/ G& ^4 X3 Y5 ?. z mgr: ceph2.twhubv(active, since 9m), standbys: ceph1.zmducz, ceph3.dkkmft
9 N0 {" k, {; G1 S5 ~ mds: cephfs:1 {0=cephfs.ceph3.idylsu=up:active} 1 up:standby
' x c) R( f, Q7 M8 s osd: 3 osds: 3 up (since 9m), 3 in (since 11h)
0 h" L; ?4 L% w4 t5 C- N$ n rgw: 3 daemons active (ceph1, ceph2, ceph3)
v& L1 U* W9 m) Z" E. Y, ?: {! y
6 V+ z) I5 Y( X5 ] task status:
0 A- ]% I8 U% L0 A! s2 I- `
3 X4 P [' q! K- a" ?( P% e$ I3 C data:1 V) [- p/ ~- o3 B- ?
pools: 8 pools, 185 pgs
, e1 F5 o2 a% R: B6 n7 \: z8 ` objects: 240 objects, 157 KiB- M G! p( E( \% r* X9 J
usage: 3.0 GiB used, 57 GiB / 60 GiB avail
+ S3 x9 {5 e; o+ I. P4 R pgs: 185 active+clean
; r& H' R/ U4 o6 s7 Y9 g" g! z; T. v' ?$ X& y
progress:
+ w9 ~6 c- p/ o% R8 _/ S PG autoscaler decreasing pool 5 PGs from 64 to 8 (5m), p3 D0 [0 k4 ~/ y" j+ _8 m
[======================......] (remaining: 81s)4 y# v# e) r5 N. s
2 h+ V0 P0 D& e6 k$ B# W; {自动下降到185。因为是虚机下降速度较慢。
- W$ T+ K% w; N- {+ M% H+ H3 | |
|