易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 1859|回复: 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"
  ^; w& ?5 u  q1 ]  B+ `% `2 xosd_max_backfills = 1) `2 O$ Q6 i0 M( j
osd_recovery_max_active = 0: C$ |2 ?3 M5 \9 ^$ I3 n" ^, u6 d
osd_recovery_max_active_hdd = 3
0 H. p) O* G( [: w& m; fosd_recovery_max_active_ssd = 10: I7 w) b& l% _
osd_recovery_op_priority = 35 a7 {7 @1 z5 N8 r- T/ U; ~
[root@ceph1 ~]# ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=6, |; m, X- f6 w  l1 |7 f& @
osd.0: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) 6 u% X  q2 D- p% c" C1 j9 F! D$ C
osd.0: {}
: h$ C8 d& y; [' z8 Dosd.1: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) , Q7 d$ ^# r/ l
osd.1: {}
  Z+ U1 ~( F( [0 e, L6 {osd.2: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart)
2 A2 g0 k$ x  g& K* I: Cosd.2: {}6 x+ z: w6 S4 p
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
  Y6 m2 T9 x) s+ J$ Kosd_max_backfills = 15 E! p7 Y6 D2 l# M1 ^
osd_recovery_max_active = 0
0 D1 C* p8 _  W2 Y" x3 tosd_recovery_max_active_hdd = 3+ @% a* ]+ r% |! H, Y. {
osd_recovery_max_active_ssd = 10
. [% [. y, ^, a" o' I7 l# D3 L; iosd_recovery_op_priority = 3  ]: n2 |+ l* M7 r0 l
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"( D; J# f5 {* h
osd_max_backfills = 19 O0 M: F& b; A9 ~
osd_recovery_max_active = 0, f5 u" T& E. t" h$ o
osd_recovery_max_active_hdd = 3+ L" f8 Y, v- i- b; I0 n8 m) S
osd_recovery_max_active_ssd = 10
5 q; C8 X8 ~4 Xosd_recovery_op_priority = 33 o# }* R6 L: ]2 E
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"0 z/ R' w" X% F$ O8 @6 m9 k( i) ^
osd_max_backfills = 1
: r2 G% w/ \2 p# ~osd_recovery_max_active = 0
. S- O2 `/ A* h, U  dosd_recovery_max_active_hdd = 3
7 X, b4 I% g: Q+ I! \* g  o* gosd_recovery_max_active_ssd = 102 v1 `7 ]" h. B* B
osd_recovery_op_priority = 3% w$ f* c! L+ H! \8 |
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
, A' s4 Z  b8 e: M) I; Bosd_max_backfills = 1
% `" {9 ^5 C' k5 }osd_recovery_max_active = 02 e* g, M+ p+ [0 L4 W6 e$ K
osd_recovery_max_active_hdd = 3
/ x" {0 {! ?+ ?7 R% C) C4 i- ]  yosd_recovery_max_active_ssd = 104 ?, L/ z) v& I3 }$ l
osd_recovery_op_priority = 3
1 a$ a. f* l9 C[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
; m4 m8 T; ?2 ~# i) b# r2 B6 v7 cosd_max_backfills = 1( S' ]% H" @' H5 I! i
osd_recovery_max_active = 0" k6 [/ U! |% b- |
osd_recovery_max_active_hdd = 3
: Q) p4 R, Y0 F$ A2 ^& ~osd_recovery_max_active_ssd = 107 D6 |6 r9 a% K: c9 G* u
osd_recovery_op_priority = 3
1 A+ c+ O& H. O1 ^( |6 B) L3 E5 b[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
6 t& j5 d" s7 U6 k: Oosd_max_backfills = 1
" q2 ?1 w( v7 J" k. Z3 aosd_recovery_max_active = 0
9 a* _8 @$ D( r( iosd_recovery_max_active_hdd = 3' ?' ]/ c5 L& M1 R, s1 w$ ]
osd_recovery_max_active_ssd = 10
! `6 I- k9 e& N. ]) t' w$ kosd_recovery_op_priority = 3( z" N. d, ^* R
[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
6 M& z. {9 A6 i; ^# posd_max_backfills = 1
. @( J6 T% B0 n6 c" g+ \* B. ]osd_recovery_max_active = 0
* A" l; n: d, Y$ ?9 Bosd_recovery_max_active_hdd = 3
, G9 ^+ S9 x5 k- v- kosd_recovery_max_active_ssd = 10+ m/ t9 W0 x& o0 ^' G* ^6 z
osd_recovery_op_priority = 31 M. t% K- C* B+ k9 j
[root@ceph1 ~]# ceph daemon osd.1 config get osd_max_backfills" [1 j& u+ Z' m( k9 Z, J) a# G
admin_socket: exception getting command descriptions: [Errno 2] No such file or directory3 C6 @! S9 ]# w+ S- |) c
[root@ceph1 ~]# ceph config show osd.2, y# |1 C* X& [5 b/ P
NAME                            VALUE                                                                                                                                                        SOURCE    OVERRIDES  IGNORES
; ~; J* W# O0 i- O5 hcontainer_image                 quay.io/ceph/ceph:v15                                                                                                                                        mon                         8 g2 \# b$ H' D$ U) \
daemonize                       false                                                                                                                                                        override                    
- r" F) g4 Q" I$ O! y3 ]& T0 Ckeyring                         $osd_data/keyring                                                                                                                                            default                     " L; C- x4 j) _' C! x7 L% w
leveldb_log                                                                                                                                                                                  default                     9 k5 m% r) e( }+ e
log_stderr_prefix               debug                                                                                                                                                        default                     
, G7 Y" v8 M, ylog_to_file                     false                                                                                                                                                        default                     % |0 r$ l7 D0 k8 C8 U+ R; E& y; Z
log_to_stderr                   true                                                                                                                                                         default                     ; k3 s6 R2 D$ T# G
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                        
9 K% O% N: ^( e9 ~: Imon_warn_on_pool_no_redundancy  false                                                                                                                                                        mon                         : x# Z. j! K7 q
no_config_file                  false                                                                                                                                                        override                    
$ u# i! F$ P/ k* e  v7 tosd_max_backfills               2                                                                                                                                                            override                    
6 ]1 d1 z. a) u4 tosd_recovery_max_active         6                                                                                                                                                            override                    3 {6 _2 N: K* Q1 X( B
rbd_default_features            61                                                                                                                                                           default                     
8 x5 U6 P3 h& w0 a* e: Ysetgroup                        ceph                                                                                                                                                         cmdline                     + G1 V  |$ o5 L8 O
setuser                         ceph                                                                                                                                                         cmdline                     
; t5 T8 `9 k5 B9 t# A0 {& u[root@ceph1 ~]# ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"' V. Y% S' R  j1 Z* p
osd_max_backfills = 1
0 i9 Z$ K/ ~6 l+ G& C- Mosd_recovery_max_active = 06 W1 V! R& {" D/ ~9 t; [* V9 o( V
osd_recovery_max_active_hdd = 3: |( s; p  z5 ~0 @) U
osd_recovery_max_active_ssd = 10
; ?2 W7 }9 T4 h; L$ I4 w- Zosd_recovery_op_priority = 3  H2 N: }! ~0 ?. P
[root@ceph1 ~]# ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=6
0 F; J9 X4 u% v4 [" G, [osd.0: {}3 `% b3 B5 g% p2 `& H
osd.1: {}# e# \( K3 ?' W" [1 I$ d" U: a. F
osd.2: {}8 B6 M# x: P' b( `! s. A7 Y, M
 楼主| 发表于 2023-1-9 09:15:38 | 显示全部楼层
[root@ceph1 ~]#  ceph tell 'osd.*' injectargs --osd-max-backfills=2 --osd-recovery-max-active=6
% r" V# K5 e* X" wosd.0: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart) ' p% @8 [; Q* J# J. P) V" z* B: P: f
osd.0: {}2 R. X3 |7 ^8 t; d* D$ v
osd.1: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart)
/ G. u( Z  N+ X; aosd.1: {}3 m3 h0 m( B+ X3 b& V' d( q0 l
osd.2: osd_max_backfills = '2' osd_recovery_max_active = '6' (not observed, change may require restart)
4 y: N2 e/ z9 O! p( cosd.2: {}: K7 I" u# N' [$ Z7 M% i' g
[root@ceph1 ~]#  ceph-conf --show-config | egrep "osd_recovery_max_active|osd_recovery_op_priority|osd_max_backfills"
) P9 F' L5 b. Y% W4 s& Mosd_max_backfills = 1
9 c- K. b4 ?" ]4 vosd_recovery_max_active = 0
9 Z5 p/ Q$ e- F: s; h" ^" Gosd_recovery_max_active_hdd = 3( W  w7 t2 {& b" B: W- R* V3 J: H
osd_recovery_max_active_ssd = 10
7 J' M+ C$ Q0 L* B0 L4 X# P/ J- qosd_recovery_op_priority = 3; a" w1 k5 z8 _6 q" @+ r, ^0 f
[root@ceph1 ~]# ceph config show osd.28 M' }. I  O4 U  l$ T+ Q! k6 J6 y! w
NAME                            VALUE                                                                                                                                                        SOURCE    OVERRIDES  IGNORES
9 n2 a, B- ]2 I6 tcontainer_image                 quay.io/ceph/ceph:v15                                                                                                                                        mon                         : D5 B8 r/ a% O% ]2 V
daemonize                       false                                                                                                                                                        override                    # \4 @/ p% \! U) i2 W3 C
keyring                         $osd_data/keyring                                                                                                                                            default                     : u5 h  H; M+ p3 z
leveldb_log                                                                                                                                                                                  default                     
. N. l4 O0 J. j' A1 S, Xlog_stderr_prefix               debug                                                                                                                                                        default                     6 M# }0 @0 N- q7 R/ E/ e- z
log_to_file                     false                                                                                                                                                        default                     6 k5 U0 X/ L4 e8 o+ z; s, l
log_to_stderr                   true                                                                                                                                                         default                     : Y* g6 o4 v3 x. X
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                        / f2 }8 r8 H4 O2 O5 M, j1 l. c
mon_warn_on_pool_no_redundancy  false                                                                                                                                                        mon                        
1 ?: h  W* o# p* yno_config_file                  false                                                                                                                                                        override                    
  O/ z8 ~3 {7 p0 yosd_max_backfills               2                                                                                                                                                            override                    ; I  @7 ]! c0 f5 m/ ^
osd_recovery_max_active         6                                                                                                                                                            override                      T: a' a% w4 K) Y
rbd_default_features            61                                                                                                                                                           default                     
7 Y4 y4 ]* [5 F1 Z1 t! gsetgroup                        ceph                                                                                                                                                         cmdline                     : s- p7 S# ]. y8 Y- r# P9 E
setuser                         ceph                                                                                                                                                         cmdline          $ s3 |2 J# k: Y* U
# D+ z+ ^8 n* [) \7 E% ]2 P
" Y' A* S- c: |# I  J* G$ J* D
这个只是临时生效。重启集群后失效。
 楼主| 发表于 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
% B" @, G4 Y3 K8 K[root@ceph1 ~]# ceph config show osd.1 osd_recovery_max_active" _, @: z) u' {! ]. h) x1 @
4( B  [% v+ G5 H! N
 楼主| 发表于 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:2 s) U% m2 g1 ?# v! h

+ h8 K2 L0 Q9 H: g. uceph daemon osd.<insert_id> config get osd_max_backfills9 j+ Q2 K& u3 m/ R! d8 U7 d: I" A! K1 o

* |) a/ @, s: o+ o& q, `To set back to default:$ m/ [$ S& g2 Y
ceph tell 'osd.*' injectargs --osd-max-backfills=1 --osd-recovery-max-active=3& A4 O* P+ ^- e
, f; K4 U9 D: ?) O% G0 E
With SES 6, "ceph config set" can alternatively be used:
6 H+ y  G7 K# p9 G" o" |  e3 |7 v
+ }' e% W: z& Sceph config set osd osd_max_backfills 26 e/ \+ J. B; c7 |. o! }
ceph config set osd osd_recovery_max_active 3/ s+ _& ~5 K0 P

- _- R2 g# ~4 T' f/ ?& {6 W. a6 MTo set back to default:0 i4 O. s. a( F& Y# U
: o1 T4 K7 l* P% D$ U' @+ h
ceph config rm osd osd_recovery_max_active7 b  f8 u- C$ s: J0 |2 v4 l
ceph config rm osd osd_max_backfills. z( w  U8 D& j$ d% B6 {5 N
1 L& I+ ]- @' r$ \  j$ S/ V7 a
To view the current settings:
# z  ^5 ~# Q* j8 n+ {1 h1 p% D
3 W3 \. i  w2 h& b6 Y* Uceph config show osd.<insert_id>
) `5 |0 Z: W) c$ c$ ^% Q * I0 I$ t7 u0 z0 C
Recovery can be monitored with "ceph -s".& u! Y- s4 b/ |; i( a! p$ ^
, B( d0 f- A; }: @& ^
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.1 D5 `1 p3 R8 g8 }/ x- t/ z

; B5 j1 Q; F  A* W! [2 z! POnce 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|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-8 07:26 , Processed in 0.048960 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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