易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1852|回复: 6
收起左侧

ceph 15版本中速率设置max_backfills和osd_recovery_max_active详解

[复制链接]
发表于 2023-1-9 08:00:02 | 显示全部楼层 |阅读模式
购买主题 本主题需向作者支付 2 金钱 才能浏览
 楼主| 发表于 2023-1-9 08:00:03 | 显示全部楼层
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills") s3 X) P) V! K
osd_max_backfills = 1
( s3 k, d1 u! `) yosd_recovery_max_active = 0
0 M" f- r  Z8 hosd_recovery_max_active_hdd = 3
5 I; a- T( P, d; {osd_recovery_max_active_ssd = 10
' V$ }8 w( Z. ~1 fosd_recovery_op_priority = 3
* x; S" w2 Y* C* P  z% U7 {[root@ceph1 ~]# ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=6
$ [; |1 o0 d. E9 P2 M6 Wosd.0: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) ' H/ e, P6 O& L# y( l
osd.0: {}- I( Q1 Y" \( Y) a- r
osd.1: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart)
% y& D2 D" _1 M& n+ fosd.1: {}1 P2 r4 I, Y7 C  {9 B" I
osd.2: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) 6 L0 {' C& w+ g; B9 w% y: G
osd.2: {}  ?3 `) t. u9 ~8 ]0 H% W' j& {8 k
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
0 D6 L# n) T3 J' q  w4 |# k6 r& B% xosd_max_backfills = 1/ t3 B- k7 t5 B: Y2 r
osd_recovery_max_active = 0' n5 _) y/ h5 m& ^  S" ?
osd_recovery_max_active_hdd = 3
; F* ]8 z% c( {/ z7 n$ ~osd_recovery_max_active_ssd = 10
& u; \2 T0 x: z7 n, xosd_recovery_op_priority = 37 J3 A; Q  ?" d  s2 H
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
; U! ?7 |* b- C& s# eosd_max_backfills = 1
$ O9 a5 K6 z4 k8 x+ p+ o5 Eosd_recovery_max_active = 0
* _7 w/ D) a' F# p9 aosd_recovery_max_active_hdd = 3
3 n2 C5 E( @5 Q' h. n7 Sosd_recovery_max_active_ssd = 10
; C3 k: R$ x$ s0 {( b' v9 Kosd_recovery_op_priority = 3+ B1 O$ i" u; w1 j- W  e" U' \
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"/ v* B9 X* _; [9 o. ?
osd_max_backfills = 17 B. E" k) @. n0 \+ j7 R
osd_recovery_max_active = 0* w" }7 Y9 f( n$ v$ w! N; j3 p9 H
osd_recovery_max_active_hdd = 39 \8 {2 I/ p" d( E2 y: ~
osd_recovery_max_active_ssd = 10
! F$ G8 r. \5 N/ Y+ U9 oosd_recovery_op_priority = 3+ T/ J0 t7 R' F4 _* i5 d
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
  ^& X/ c- V) |3 }, zosd_max_backfills = 1
% U& u$ x& s/ z: M8 q+ p0 X$ yosd_recovery_max_active = 0
9 l& W2 F1 ?; u, j0 Posd_recovery_max_active_hdd = 3; ~3 C, w! ~( ~. q6 c
osd_recovery_max_active_ssd = 10
% ^- o& b: W: g$ l9 m5 V( c: Xosd_recovery_op_priority = 3
9 k4 g6 E" D3 [& Z$ a9 U" W1 u[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
+ P( D, {  i+ Y3 ~9 l% }# ^osd_max_backfills = 1
3 ]) o6 B; E0 _6 R  G3 }" Tosd_recovery_max_active = 08 P3 f* u. E: v  x7 B4 m; ?% x
osd_recovery_max_active_hdd = 3
. G1 s0 ?+ f8 P4 uosd_recovery_max_active_ssd = 10
3 r4 G3 B" t' y% r! Zosd_recovery_op_priority = 3
8 l* P$ l, h, }, W: m/ g3 a$ F[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
. q( X- h) g3 t! cosd_max_backfills = 1
3 b- d: d; ^/ q/ j( p6 vosd_recovery_max_active = 0" R$ z( `# X4 K0 \) b" v9 F; m
osd_recovery_max_active_hdd = 3
1 Y3 p$ U* ?3 q2 @$ Aosd_recovery_max_active_ssd = 10
' H) L0 v( ^1 Y/ f0 Hosd_recovery_op_priority = 3
( [) V  c- u: X  }( |# a0 U) g- B2 C[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
' w4 _2 N+ [: Fosd_max_backfills = 14 a; |7 c9 b! }+ L) o8 e
osd_recovery_max_active = 09 ~! M+ k( G3 ^7 H  ]
osd_recovery_max_active_hdd = 3# i( h+ Z- x4 l8 v( E$ X
osd_recovery_max_active_ssd = 10. V+ ?1 E" h/ A( L) J1 W7 T
osd_recovery_op_priority = 3
- o$ Z9 G2 `; J$ [, a& ?) ]! j, X[root@ceph1 ~]# ceph daemon osd.1 config get osd_max_backfills
& A0 K  E9 h5 r. a7 s% [! fadmin_socket: exception getting command descriptions: [Errno 2] No such file or directory
+ z3 U  p) o: V4 E( r[root@ceph1 ~]# ceph config show osd.2
3 A+ {9 N1 }& X3 Q/ B8 t* [3 hNAME                            VALUE                                                                                                                                                        SOURCE    OVERRIDES  IGNORES( ]8 G' {& d* ^+ Z4 |, z
container_image                 quay.io/ceph/ceph:v15                                                                                                                                        mon                        
  s0 u. m! v8 Q7 Hdaemonize                       false                                                                                                                                                        override                    
, K3 j; b. U( Hkeyring                         $osd_data/keyring                                                                                                                                            default                     
+ X9 R, g: H) v$ `/ D6 sleveldb_log                                                                                                                                                                                  default                     
( Y* P5 a& z. e( T, c, j) Alog_stderr_prefix               debug                                                                                                                                                        default                     
; u4 c  V8 i  `: g+ _, Vlog_to_file                     false                                                                                                                                                        default                     
2 F$ b4 B7 O5 U) X4 Plog_to_stderr                   true                                                                                                                                                         default                     
& j( W5 L* \7 H6 a/ Z$ h, jmon_host                        [v2:192.168.13.170:3300/0,v1:192.168.13.170:6789/0] [v2:192.168.13.171:3300/0,v1:192.168.13.171:6789/0] [v2:192.168.13.172:3300/0,v1:192.168.13.172:6789/0]  file                        
( t: c4 H, E% B8 J9 zmon_warn_on_pool_no_redundancy  false                                                                                                                                                        mon                        
' @- ~% q4 i5 M8 D* n; i) _3 }no_config_file                  false                                                                                                                                                        override                    9 e' R% [) W" F/ G5 H& U, k
osd_max_backfills               2                                                                                                                                                            override                    
, M* H* S4 q& }. o$ ?osd_recovery_max_active         6                                                                                                                                                            override                    4 }& Z7 X# E/ L5 {. c; u! m
rbd_default_features            61                                                                                                                                                           default                     ) ?+ E/ P) `) f3 N
setgroup                        ceph                                                                                                                                                         cmdline                     : k! {0 A; ]6 h& |4 ~' f. Y* ~
setuser                         ceph                                                                                                                                                         cmdline                     
. X3 D" P& s+ Y) c8 u; t/ {5 r[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills", x( V% U* d' U6 z' X# }
osd_max_backfills = 1! f1 U6 O+ Q1 A( T- B: |  ?1 ?8 ~& `( z
osd_recovery_max_active = 0" S+ z1 U  N. Z
osd_recovery_max_active_hdd = 32 ^: A) h6 l/ h: c! A
osd_recovery_max_active_ssd = 10: ^+ [0 L# k& K: h* L# p
osd_recovery_op_priority = 3* [9 B1 m6 m8 M
[root@ceph1 ~]# ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=62 [7 d1 ^6 t7 Y$ a- l5 |
osd.0: {}) ?7 O- R1 r7 T2 c4 V) A& B
osd.1: {}2 [6 b' v8 m( s
osd.2: {}
, a( @+ |$ ~% B' ~. h3 y8 y0 \* d+ S7 c
 楼主| 发表于 2023-1-9 09:15:38 | 显示全部楼层
[root@ceph1 ~]#  ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=6. b( l+ w% @) n3 V; \% `) w$ O
osd.0: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) " X4 A" [+ y0 \2 ~8 C  _/ [
osd.0: {}
4 {; t) _, D8 X# l& N  Y2 sosd.1: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart)
4 E; ~0 e% c5 h7 _0 h2 zosd.1: {}, z# F5 ^: E  T% f0 Y6 W0 U
osd.2: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) 1 Z7 B' D7 Q" }9 W- _6 q& U
osd.2: {}2 l4 N5 _& }0 W5 t1 w
[root@ceph1 ~]#  ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills". N) N& S4 R+ }* o% l  ^( D
osd_max_backfills = 1
9 o* l- g$ f# h9 yosd_recovery_max_active = 0$ g+ R  V4 }2 E. M
osd_recovery_max_active_hdd = 3# k: s- }$ U# M. I& X) L9 O
osd_recovery_max_active_ssd = 10
- ]5 u8 P4 h8 g" Nosd_recovery_op_priority = 3# l( S7 l' V2 K4 x" l9 A
[root@ceph1 ~]# ceph config show osd.2
8 G! K% _4 H, N* P/ e; UNAME                            VALUE                                                                                                                                                        SOURCE    OVERRIDES  IGNORES
( I! d, v) s0 {2 S- d, rcontainer_image                 quay.io/ceph/ceph:v15                                                                                                                                        mon                         0 v! c9 V, }9 R. }6 C
daemonize                       false                                                                                                                                                        override                    $ Y, K' Z2 U  U  J) O& m( \6 M* s6 A
keyring                         $osd_data/keyring                                                                                                                                            default                     ; n0 H/ t$ g2 D* G
leveldb_log                                                                                                                                                                                  default                     
# E& n1 Q6 g2 _8 V# klog_stderr_prefix               debug                                                                                                                                                        default                     ; [9 H& l* m8 d8 [- @! n
log_to_file                     false                                                                                                                                                        default                     5 s  r% u( E0 s! S" k
log_to_stderr                   true                                                                                                                                                         default                     8 v6 |) Z% l: _* M8 r0 H  a$ B
mon_host                        [v2:192.168.13.170:3300/0,v1:192.168.13.170:6789/0] [v2:192.168.13.171:3300/0,v1:192.168.13.171:6789/0] [v2:192.168.13.172:3300/0,v1:192.168.13.172:6789/0]  file                        
8 y/ ~: c2 S, S! ymon_warn_on_pool_no_redundancy  false                                                                                                                                                        mon                         * Y2 D0 T$ Z7 R& f
no_config_file                  false                                                                                                                                                        override                    
' q6 C: R: z' ^1 y- m$ Fosd_max_backfills               2                                                                                                                                                            override                    7 e: H! X! n1 ~: R
osd_recovery_max_active         6                                                                                                                                                            override                    ! _$ g6 {6 e5 |  X  o4 M, n
rbd_default_features            61                                                                                                                                                           default                     
  W9 m3 l& \+ X/ Xsetgroup                        ceph                                                                                                                                                         cmdline                     ' H; }+ w! d* ?( `% Y
setuser                         ceph                                                                                                                                                         cmdline         
8 C1 E& m% b+ y5 k" Q0 s
8 k( i# V2 h, F# j( F
% h0 P% N5 I; M8 S' {8 ^8 N这个只是临时生效。重启集群后失效。
 楼主| 发表于 2023-1-9 09:45:47 | 显示全部楼层
ceph mgr module disable pg_autoscaler   关闭
 楼主| 发表于 2023-1-9 13:45:11 | 显示全部楼层
ceph config show osd.1 osd_recovery_max_active: r- s& @( |2 ~2 c
[root@ceph1 ~]# ceph config show osd.1 osd_recovery_max_active8 N% f4 f: r2 H" @3 \& Z
4
& k. _. s2 I2 z  U
 楼主| 发表于 2023-1-10 15:04:01 | 显示全部楼层
To view the current active setting(s), on the node where the the OSD being checked is running execute for example:
( a( t1 U2 Z4 ]( ^8 q
6 g; W! J; A5 y2 aceph daemon osd.<insert_id> config get osd_max_backfills
) N, ], {; |. i
; v+ {# X' L/ ATo set back to default:
! }9 u- N% M1 z" Xceph tell 'osd.*' injectargs --osd-max-backfills=1 --osd-recovery-max-active=3
; ]8 x( V5 i9 w- a% i& M# C. G! Q" F  \0 R+ A6 y$ o2 C
With SES 6, "ceph config set" can alternatively be used:
3 a  S& c6 s, F; x: B# _
9 q2 i7 `5 x( g! g' M+ X1 R7 lceph config set osd osd_max_backfills 2! Z' q0 e/ d& I7 X
ceph config set osd osd_recovery_max_active 33 J7 J' o) O0 j* s

* M  s) F# W- M6 j- G9 ]0 XTo set back to default:
1 P$ z. w  Q; H' j, \# ^ 7 u, D8 `5 \; E1 O) }) D( w
ceph config rm osd osd_recovery_max_active
7 O8 L% F6 v% w; I" lceph config rm osd osd_max_backfills$ p: q& P3 y9 e2 J" @9 q

' k+ i1 n+ {3 ^( |) }& I6 j1 tTo view the current settings:
% _2 T( E- |# x9 j1 I
+ r2 u1 x. j1 R+ G& V) ^ceph config show osd.<insert_id>
$ i$ n6 I5 t; V6 r1 J2 r. a ( J2 Q" {: {+ `7 s, i  r  w- G
Recovery can be monitored with "ceph -s".$ p! j! r8 ^# Y" \* @9 G& v
! }- A. I) P2 R  L, z
After increasing the settings, should any OSDs become unstable (restarting) or clients are negatively impacted by the additional recovery overhead then reduce the values or set them back to the defaults., h! f# S: M4 k; E, N0 B
4 k" m5 S- f: X$ s, g# c  o- Q
Once the cluster is finished with recovery and back in a HEALTH_OK state, set the values back to default.
 楼主| 发表于 2023-1-10 17:16:56 | 显示全部楼层
ceph tell 'osd.*' injectargs --osd-max-backfills=3 --osd-recovery-max-active=9    两者按照1:3的方式匹配
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:17 , Processed in 0.073572 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表