|
|
楼主 |
发表于 2024-5-29 06:00:05
|
显示全部楼层
I adopted pretty much all the recommendations, including the ssh
3 u# C( |$ a! E/ o) r! w! P7 Ncompression idea, from you two and so:; t- z9 \( N7 m( r4 O5 W7 F
% i" X9 s- L4 z
root@redis3:~# redis-cli config get * | grep -A2 repl: ?& F' z) Y i6 J: h3 i$ V
repl-ping-slave-period
^6 N# V0 m! r7 c, `* d2 y10
7 X' y; f" n+ g& `repl-timeout9 `! ]: I& f1 |2 \6 w% X
1800 R# \( i6 \& ?0 k$ G I
repl-backlog-size
& b9 e8 `" d& d) n$ C, `- q1048576000( O5 E% r' p- }
repl-backlog-ttl
+ o; X- D* q6 z3600
) K: o' d7 g `+ d' z: ?& k, E
' a7 z1 M- w, R7 Y7 ZI evetualy also changed this, from no to yes (although I know it may' ^7 {8 U& o/ b# \4 i
increase the bandwidth requirements):. i- \# f& M; x/ [
repl-disable-tcp-nodelay& m! j0 R' T3 t( I# _$ y( p
yes+ ~6 V" z1 z- m. |: l& V0 x1 u8 s
+ F6 v' l) O5 `9 S
But the result is actually worse.... by that I mean the master kicks5 P9 W, J1 Q" J% P7 d
off the slave much faster.
( j" c* o3 W( {% Z7 t
; E" y# T4 K& ^* ?Master:9 N0 [. l3 V" V9 P; i
[3355] 30 May 02:56:28.875 * Slave asks for synchronization+ P( G# z, l3 ^; F5 i5 {
[3355] 30 May 02:56:28.875 * Full resync requested by slave.3 D! y1 }; U. P. k4 J+ U
[3355] 30 May 02:56:28.875 * Starting BGSAVE for SYNC) u6 `- V5 b" ^4 n. t- Q
[3355] 30 May 02:56:35.376 * Background saving started by pid 16330
: m4 U1 k0 o! i* P K4 l( w. G+ }[3355] 30 May 02:56:43.733 # Client addr=127.0.0.1:49630 fd=185 name=9 K# r8 B7 K+ {/ n3 g5 E5 o
age=15 idle=15 flags=S db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0, C; ^& P9 ?$ d3 I
obl=16372 oll=2896 omem=268753696 events=r cmd=psync scheduled to be
! c. l$ z/ | Z5 {, {+ d+ t* e$ S( pclosed ASAP for overcoming of output buffer limits.+ l" ` M/ ~, ~( J1 \
[16330] 30 May 02:59:44.675 * DB saved on disk
$ Y) Z0 C$ B: a* P5 E" c# U( g' r[16330] 30 May 02:59:46.216 * RDB: 2397 MB of memory used by copy-on-write$ d4 Z: f9 e$ \! G
[3355] 30 May 02:59:48.806 * Background saving terminated with success
" x' \5 D+ U; u# U...
, H% u& o$ `3 C. k! P I, Z
4 T9 u1 c/ p% F& {8 D: P% T! F# FSlave:
0 }6 n# Y6 q1 u: ?* i5 C* A5 u0 h[19460] 30 May 02:56:27.975 * DB loaded from disk: 210.107 seconds
# m: J0 F6 k! G[19460] 30 May 02:56:27.976 * The server is now ready to accept' q8 U {* o. r) M
connections on port 6379
" L2 C _( l/ T5 }0 N) ^1 v[19460] 30 May 02:56:28.869 * Connecting to MASTER localhost:6280
* _: Z$ z) \) E( Q[19460] 30 May 02:56:28.869 * MASTER <-> SLAVE sync started
7 m6 J1 [8 L3 X( p7 M. C" a! l" Q[19460] 30 May 02:56:28.870 * Non blocking connect for SYNC fired the event.
( v) \" L3 t3 q, R[19460] 30 May 02:56:28.873 * Master replied to PING, replication can
" D& m A, l7 G# ]! {/ T/ t" W: P& Dcontinue...
3 F7 b6 {2 r: C1 k- N4 h5 l[19460] 30 May 02:56:28.875 * Partial resynchronization not possible0 r3 J4 Q0 l g/ l3 t/ X
(no cached master)+ z( X# P, s9 ~& U
[19460] 30 May 02:56:28.877 * Full resync from master:' C2 Z! f8 y( [- r$ I7 P
621480e9295872416266e563939b4fd6724eb5b7:683852534083 [" Y5 A' H9 O1 Z
...
7 @' T5 M3 F Y/ _9 t* G. S, p) T s i
So, 3 questions please:- x$ |% U, n/ ^! `0 } o' z* c$ b
. F. b8 {: R) i0 g1 R0 b
1. Do I need to make the same and all of the configurations on the slave too?
0 f, h0 Z2 r Y' s+ q W3 Y; Q% b
8 U# y3 y' K% S2. Can the "Partial resynchronization not possible (no cached master)"
f, `4 d. d/ x0 _% e; f& Vbe overcome somehow? I have full backups via BGSAVE of the master each
+ N$ J* r, | x$ n! l6 b; a1 [4 J# }hour (yes, I stopped those while attempting the slaving stuff) so I
+ {. ]0 m. [) k9 d: ecould use the latest one to load it masnually in the salve and then
' u- w3 F# }; Q. mattach the slave to the master - last time I tried that however, the
5 b+ A$ a" M2 E0 Oslave still requested a full resync.... |
|