codis搭建&迁移方案
1.1 codis迁移规格
ECS:测试实例3台32C128GB规格 REDIS:Redis 4.0—128G集群版16节点
1.2 codis-demo架构
代码语言:javascript复制zookeeper集群:
192.168.10.45
192.168.10.46
192.168.10.47
codis-config、codis-dashboard:
192.168.10.45:18087
192.168.10.45:8090
codis-proxy:
192.168.10.45:19000
192.168.10.46:19000
192.168.10.47:19000
codis-server(每个节点分配50G的内存):
192.168.10.45:6379、192.168.10.46:6380(主、从)
192.168.10.46:6379、192.168.10.47:6380(主、从)
192.168.10.47:6379、192.168.10.45:6380(主、从)
1.3 codis-demo部署
1 部署安装包zookeeper、jdk、golang、codis
ansible hosts
代码语言:javascript复制/etc/ansible/hosts
[codis]
c1 ansible_ssh_host=47.106.91.108 ansible_ssh_user=root ansible_ssh_pass=123456
c2 ansible_ssh_host=120.24.255.96 ansible_ssh_user=root ansible_ssh_pass=123456
c3 ansible_ssh_host=120.25.193.146 ansible_ssh_user=root ansible_ssh_pass=123456
run playbook
代码语言:javascript复制ansible-playbook codis.yml -e jdk_pkg_path=/Users/gaomingjie/Downloads/jdk-8u131-linux-x64.tar.gz -e zk_pkg_path=/Users/gaomingjie/Downloads/zookeeper-3.4.8.tar.gz -e codis_pkg_path=/Users/gaomingjie/Downloads/codis3.2.2-go1.9.2-linux.tar.gz
codis.yml
代码语言:javascript复制---
- hosts: codis
vars:
version: "0.0.1"
remote_user: root
tasks:
- name: install golang
yum:
name: "golang"
state: present
- name: add ssh authorized keys for root
authorized_key:
user: root
state: present
key: "{{ lookup('file', lookup('env','HOME') '/.ssh/id_rsa.pub') }}"
- name: copy jdk
copy:
src: "{{ jdk_pkg_path }}"
dest: /tmp
- name: set jdk
shell: |
mkdir -p /data/servers/
tar xzf jdk-8u131-linux-x64.tar.gz
mv jdk1.8.0_131 /data/servers/
echo 'export JAVA_HOME=/data/servers/jdk1.8.0_131' >> /etc/profile
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> /etc/profile
echo 'export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar' >> /etc/profile
args:
chdir: /tmp
warn: no
- name: copy zk
copy:
src: "{{ zk_pkg_path }}"
dest: /tmp
- name: set zk
shell: |
mkdir -p /data/servers/
tar xzf zookeeper-3.4.8.tar.gz
mv zookeeper-3.4.8 /data/servers/
echo -e 'maxClientCnxns=50ntickTime=2000ninitLimit=10nsyncLimit=5ndataDir=/data/zookeeper/nclientPort=2181nserver.1=192.168.10.45:2888:3888nserver.2=192.168.10.46:2888:3888nserver.3=192.168.10.47:2888:3888' > /data/servers/zookeeper-3.4.8/conf/zoo.cfg
mkdir /data/zookeeper/
args:
chdir: /tmp
warn: no
- name: copy codis
copy:
src: "{{ codis_pkg_path }}"
dest: /tmp
- name: set zk
shell: |
tar xzf codis3.2.2-go1.9.2-linux.tar.gz
mv codis3.2.2-go1.9.2-linux /data/servers/
args:
chdir: /tmp
warn: no
2 配置启动zk
代码语言:javascript复制# 45、46、47上别分执行
echo "1" >/data/zookeeper/myid
echo "2" >/data/zookeeper/myid
echo "3" >/data/zookeeper/myid
/data/servers/zookeeper-3.4.8/bin/zkServer.sh start
/data/servers/zookeeper-3.4.8/bin/zkServer.sh status
3 启动dashboard(45)
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/codis-dashboard --default-config | tee /data/servers/codis3.2.2-go1.9.2-linux/dashboard.toml
# edit dashboard.toml
coordinator_name = "zookeeper"
coordinator_addr = "192.168.10.45:2181,192.168.10.46:2181,192.168.10.47:2181"
product_name = "codis-***"
/data/servers/codis3.2.2-go1.9.2-linux/codis-dashboard --ncpu=1 --config=/data/servers/codis3.2.2-go1.9.2-linux/dashboard.toml --log=dashboard.log --log-level=WARN &
确认启动成功
代码语言:javascript复制# tail -f /data/servers/codis3.2.2-go1.9.2-linux/dashboard.log.2019-11-18
sentinel_client_timeout = "10s"
sentinel_quorum = 2
sentinel_parallel_syncs = 1
sentinel_down_after = "30s"
sentinel_failover_timeout = "5m"
sentinel_notification_script = ""
sentinel_client_reconfig_script = ""
2019/11/18 12:02:20 topom_sentinel.go:169: [WARN] rewatch sentinels = []
2019/11/18 12:02:20 main.go:179: [WARN] [0xc4201d3680] dashboard is working ...
2019/11/18 12:02:20 topom.go:429: [WARN] admin start service on [::]:18080
4 启动代理(45、46、47)
45
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --default-config | tee /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_name.*/jodis_name = "zookeeper"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_addr.*/jodis_addr = "192.168.10.45:2181,192.168.10.46:2181,192.168.10.47:2181"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_timeout.*/jodis_timeout = "20s"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_compatible.*/jodis_compatible = true/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*admin_addr.*/admin_addr = "192.168.10.45:11080"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*proxy_addr.*/proxy_addr = "192.168.10.45:19000"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --ncpu=1 --config=/data/servers/codis3.2.2-go1.9.2-linux/proxy.toml --log=proxy.log --log-level=WARN &
46
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --default-config | tee /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_name.*/jodis_name = "zookeeper"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_addr.*/jodis_addr = "192.168.10.45:2181,192.168.10.46:2181,192.168.10.47:2181"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_timeout.*/jodis_timeout = "20s"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_compatible.*/jodis_compatible = true/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*admin_addr.*/admin_addr = "192.168.10.46:11080"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*proxy_addr.*/proxy_addr = "192.168.10.46:19000"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --ncpu=1 --config=/data/servers/codis3.2.2-go1.9.2-linux/proxy.toml --log=proxy.log --log-level=WARN &
47
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --default-config | tee /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_name.*/jodis_name = "zookeeper"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_addr.*/jodis_addr = "192.168.10.45:2181,192.168.10.46:2181,192.168.10.47:2181"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_timeout.*/jodis_timeout = "20s"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*jodis_compatible.*/jodis_compatible = true/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*admin_addr.*/admin_addr = "192.168.10.47:11080"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
sed -ir "s/#*proxy_addr.*/proxy_addr = "192.168.10.47:19000"/" /data/servers/codis3.2.2-go1.9.2-linux/proxy.toml
/data/servers/codis3.2.2-go1.9.2-linux/codis-proxy --ncpu=1 --config=/data/servers/codis3.2.2-go1.9.2-linux/proxy.toml --log=proxy.log --log-level=WARN &
5 启动server(45、46、47)
45
代码语言:javascript复制mkdir -p /data/redis/redis_6379
cat >> /data/redis/redis-6379.conf << EOF
pidfile "/data/redis/redis_6379.pid"
logfile "/data/redis/redis_6379.log"
port 6379
dbfilename dump_6379.rdb
dir /data/redis/redis_6379
logfile "/data/redis/redis_6379.log"
maxmemory 50g
bind 192.168.10.45
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6379.conf &
mkdir -p /data/redis/redis_6380
cat >> /data/redis/redis-6380.conf << EOF
pidfile "/data/redis/redis_6380.pid"
logfile "/data/redis/redis_6380.log"
port 6380
dbfilename dump_6380.rdb
dir /data/redis/redis_6380
logfile "/data/redis/redis_6380.log"
maxmemory 50g
bind 192.168.10.45
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6380.conf &
46
代码语言:javascript复制mkdir -p /data/redis/redis_6379
cat >> /data/redis/redis-6379.conf << EOF
pidfile "/data/redis/redis_6379.pid"
logfile "/data/redis/redis_6379.log"
port 6379
dbfilename dump_6379.rdb
dir /data/redis/redis_6379
logfile "/data/redis/redis_6379.log"
maxmemory 50g
bind 192.168.10.46
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6379.conf &
mkdir -p /data/redis/redis_6380
cat >> /data/redis/redis-6380.conf << EOF
pidfile "/data/redis/redis_6380.pid"
logfile "/data/redis/redis_6380.log"
port 6380
dbfilename dump_6380.rdb
dir /data/redis/redis_6380
logfile "/data/redis/redis_6380.log"
maxmemory 50g
bind 192.168.10.46
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6380.conf &
47
代码语言:javascript复制mkdir -p /data/redis/redis_6379
cat >> /data/redis/redis-6379.conf << EOF
pidfile "/data/redis/redis_6379.pid"
logfile "/data/redis/redis_6379.log"
port 6379
dbfilename dump_6379.rdb
dir /data/redis/redis_6379
logfile "/data/redis/redis_6379.log"
maxmemory 50g
bind 192.168.10.47
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6379.conf &
mkdir -p /data/redis/redis_6380
cat >> /data/redis/redis-6380.conf << EOF
pidfile "/data/redis/redis_6380.pid"
logfile "/data/redis/redis_6380.log"
port 6380
dbfilename dump_6380.rdb
dir /data/redis/redis_6380
logfile "/data/redis/redis_6380.log"
maxmemory 50g
bind 192.168.10.47
EOF
/data/servers/codis3.2.2-go1.9.2-linux/codis-server /data/redis/redis-6380.conf &
启动成功
代码语言:javascript复制ss -tnlp|grep 63*
LISTEN 0 128 *:6379 *:* users:(("codis-server",pid=21422,fd=5))
LISTEN 0 128 *:6380 *:* users:(("codis-server",pid=21434,fd=5))
LISTEN 0 128 [::]:6379 [::]:* users:(("codis-server",pid=21422,fd=4))
LISTEN 0 128 [::]:6380 [::]:* users:(("codis-server",pid=21434,fd=4))
6 启动fe(45)
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/codis-fe --ncpu=1 --log=/data/servers/codis3.2.2-go1.9.2-linux/fe.log --log-level=WARN --zookeeper=192.168.10.45:2181 --listen=192.168.10.45:8090 &
7 安装gnome(45)
代码语言:javascript复制yum groupinstall -y "X Window System"
yum groupinstall -y "GNOME Desktop"
startx
# 685372
8 fe中添加server
访问192.168.10.45:8090
9 fe中分配slot
分配slot然后rebalance
10 fe中添加proxy
1.4 codis-demo可用性验证
连接45的proxy
代码语言:javascript复制/data/servers/codis3.2.2-go1.9.2-linux/redis-cli -h 192.168.10.45 -p 19000
192.168.10.45:19000> info
# Server
redis_version:3.2.11
redis_git_sha1:9fde2809
redis_git_dirty:0
redis_build_id:cb97fcdb1c95669d
redis_mode:standalone
os:Linux 3.10.0-1062.1.2.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.4
process_id:21057
run_id:31c213328640d0d1b3603767b2697e790279f945
tcp_port:6379
uptime_in_seconds:1828
uptime_in_days:0
hz:10
lru_clock:13775518
executable:/data/servers/codis3.2.2-go1.9.2-linux/codis-server
config_file:/data/redis/redis-6379.conf
# Clients
connected_clients:49
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:4806264
used_memory_human:4.58M
used_memory_rss:16683008
used_memory_rss_human:15.91M
used_memory_peak:5501400
used_memory_peak_human:5.25M
total_system_memory:130779041792
total_system_memory_human:121.80G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:1000000000
maxmemory_human:953.67M
maxmemory_policy:noeviction
mem_fragmentation_ratio:3.47
mem_allocator:jemalloc-4.0.3
# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1574054949
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
# Stats
total_connections_received:51
total_commands_processed:8121
instantaneous_ops_per_sec:23
total_net_input_bytes:194877
total_net_output_bytes:3899756
instantaneous_input_kbps:0.36
instantaneous_output_kbps:2.97
rejected_connections:0
sync_full:1
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:541
migrate_cached_sockets:0
# Replication
role:master
connected_slaves:1
slave0:ip=192.168.10.46,port=6380,state=online,offset=2311,lag=0
master_repl_offset:2311
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2
repl_backlog_histlen:2310
# CPU
used_cpu_sys:0.52
used_cpu_user:0.21
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
# Cluster
cluster_enabled:0
添加数据
代码语言:javascript复制192.168.10.45:19000> set name jack
OK
其他节点连接proxy可以查到数据
代码语言:javascript复制# ./redis-cli -h 192.168.10.47 -p 19000
192.168.10.47:19000> get name
"jack"
# ./redis-cli -h 192.168.10.46 -p 19000
192.168.10.46:19000> get name
"jack"
1.5 codis-demo灌数据
2w个list 每个list里面有10000随机数据
代码语言:javascript复制# r.sh
for i in `seq $1 $2`;do /data/servers/codis3.2.2-go1.9.2-linux/redis-benchmark -h 192.168.10.45 -p 19000 -r 10000 lpush k$i __rand_int__ > /dev/null 2>&1;done
sh r.sh 20000 40000 &
3个简单key
代码语言:javascript复制set s1 data1
set s2 data2
set s3 data3
2个简单hash
代码语言:javascript复制HMSET h1 f1 1 f2 2 f3 3 f4 4 f5 5
HMSET h2 f1 1 f2 2 f3 3 f4 4 f5 5
主要看下量上去的迁移速度,其他有需要在添加
1.6 codis-demo到redis集群版迁移
注意:使用redis-shake全量 增量迁移;数据需要从DB节点直接获取;big_key_threshold
需要配置为1
迁移架构
网络延迟记录(shake在db节点上,延迟指shake到redis集群版)
代码语言:javascript复制# ping 192.168.10.85
PING 192.168.10.85 (192.168.10.85) 56(84) bytes of data.
64 bytes from 192.168.10.85: icmp_seq=1 ttl=102 time=0.081 ms
64 bytes from 192.168.10.85: icmp_seq=2 ttl=102 time=0.089 ms
64 bytes from 192.168.10.85: icmp_seq=3 ttl=102 time=0.077 ms
64 bytes from 192.168.10.85: icmp_seq=4 ttl=102 time=0.086 ms
64 bytes from 192.168.10.85: icmp_seq=5 ttl=102 time=0.083 ms
redis-shake操作记录 https://help.aliyun.com/document_detail/125941.html?spm=5176.2020520141.0.0.308c6375KXAK0c https://yq.aliyun.com/articles/691794
代码语言:javascript复制wget https://github.com/alibaba/RedisShake/releases/download/release-v1.6.21-20191112/redis-shake-1.6.21.tar.gz
tar xzvf redis-shake-1.6.21.tar.gz
sed -ir "s/#*source.type.*/source.type = cluster/" ./redis-shake.conf
sed -ir "s/#*source.address.*/source.address = 192.168.10.45:6379;192.168.10.46:6379;192.168.10.47:6379/" ./redis-shake.conf
sed -ir "s/#*source.password_raw.*/source.password_raw =/" ./redis-shake.conf
sed -ir "s/#*target.type.*/target.type = proxy/" ./redis-shake.conf
sed -ir "s/#*target.address.*/target.address = 192.168.10.85:6379/" ./redis-shake.conf
sed -ir "s/#*target.password_raw.*/target.password_raw =123456/" ./redis-shake.conf
sed -ir "s/#*parallel.*/parallel=64/" ./redis-shake.conf
sed -ir "s/#*big_key_threshold.*/big_key_threshold=1/" ./redis-shake.conf
数据量记录(大数据量后面可以再单独测,这里先把流程走通) 源端codis 3G左右,共809 784 694个key
目标库空
实测迁移速度&结果确认 迁移命令
代码语言:javascript复制./start.sh ./redis-shake.conf sync
cat hypervisor.output
2019/11/18 21:00:26 [INFO] redis-shake configuration: {"Id":"redis-shake","LogFile":"","LogLevel":"info","SystemProfile":9310,"HttpProfile":9320,"Parallel":64,"SourceType":"cluster","SourceAddress":"192.168.10.45:6379;192.168.10.46:6379;192.168.10.47:6379","SourcePasswordRaw":"","SourcePasswordEncoding":"","SourceAuthType":"auth","SourceTLSEnable":false,"SourceRdbInput":["local"],"SourceRdbParallel":3,"SourceRdbSpecialCloud":"","TargetAddress":"192.168.10.85:6379","TargetPasswordRaw":"123456","TargetPasswordEncoding":"","TargetDBString":"-1","TargetAuthType":"auth","TargetType":"proxy","TargetTLSEnable":false,"TargetRdbOutput":"local_dump","TargetVersion":"4.0.11","FakeTime":"","Rewrite":true,"FilterDBWhitelist":[],"FilterDBBlacklist":[],"FilterKeyWhitelist":[],"FilterKeyBlacklist":[],"FilterSlot":[],"FilterLua":false,"BigKeyThreshold":1,"Psync":false,"Metric":true,"MetricPrintLog":false,"SenderSize":104857600,"SenderCount":4096,"SenderDelayChannelSize":65535,"KeepAlive":0,"PidPath":"","ScanKeyNumber":50,"ScanSpecialCloud":"","ScanKeyFile":"","Qps":200000,"NCpu":0,"HeartbeatUrl":"","HeartbeatInterval":10,"HeartbeatExternal":"","HeartbeatNetworkInterface":"","ReplaceHashTag":false,"ExtraInfo":false,"SockFileName":"","SockFileSize":0,"FilterKey":null,"FilterDB":"","SourceAddressList":["192.168.10.45:6379","192.168.10.46:6379","192.168.10.47:6379"],"TargetAddressList":["192.168.10.85:6379"],"SourceVersion":"3.2.11","HeartbeatIp":"127.0.0.1","ShiftTime":0,"TargetReplace":true,"TargetDB":-1,"Version":"bugfix-1.6.21,7d7e77ba2fea8c65da20bb320fa584eaa7fa2fcb,go1.10.1,2019-11-12_15:01:00","Type":"sync"}
2019/11/18 21:00:26 [INFO] routine[1] starts syncing data from 192.168.10.46:6379 to [192.168.10.85:6379] with http[9323]
2019/11/18 21:00:26 [INFO] routine[0] starts syncing data from 192.168.10.45:6379 to [192.168.10.85:6379] with http[9323]
2019/11/18 21:00:26 [INFO] routine[2] starts syncing data from 192.168.10.47:6379 to [192.168.10.85:6379] with http[9323]
2019/11/18 21:00:26 [INFO] input password is empty, skip auth address[192.168.10.45:6379] with type[auth].
2019/11/18 21:00:26 [INFO] input password is empty, skip auth address[192.168.10.47:6379] with type[auth].
2019/11/18 21:00:26 [INFO] input password is empty, skip auth address[192.168.10.46:6379] with type[auth].
2019/11/18 21:00:27 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:27 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:27 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:28 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:29 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:30 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:31 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:32 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[2] - waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[2] waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:33 [INFO] dbSyncer[2] rdb file size = 388757109
2019/11/18 21:00:33 [INFO] Aux information key:redis-ver value:3.2.11
2019/11/18 21:00:33 [INFO] Aux information key:redis-bits value:64
2019/11/18 21:00:33 [INFO] Aux information key:ctime value:1574082026
2019/11/18 21:00:33 [INFO] Aux information key:used-mem value:978241872
2019/11/18 21:00:33 [INFO] db_size:694 expire_size:0
2019/11/18 21:00:34 [INFO] dbSyncer[1] - waiting source rdb
2019/11/18 21:00:34 [INFO] dbSyncer[1] waiting source rdb
2019/11/18 21:00:34 [INFO] dbSyncer[0] - waiting source rdb
2019/11/18 21:00:34 [INFO] dbSyncer[0] waiting source rdb
2019/11/18 21:00:34 [INFO] dbSyncer[1] rdb file size = 438353440
2019/11/18 21:00:34 [INFO] Aux information key:redis-ver value:3.2.11
2019/11/18 21:00:34 [INFO] Aux information key:redis-bits value:64
2019/11/18 21:00:34 [INFO] Aux information key:ctime value:1574082026
2019/11/18 21:00:34 [INFO] Aux information key:used-mem value:1102455688
2019/11/18 21:00:34 [INFO] db_size:784 expire_size:0
2019/11/18 21:00:34 [INFO] dbSyncer[0] rdb file size = 456906349
2019/11/18 21:00:34 [INFO] dbSyncer[2] total = 370.748MB - 59.549MB [ 16%] entry=64
2019/11/18 21:00:34 [INFO] Aux information key:redis-ver value:3.2.11
2019/11/18 21:00:34 [INFO] Aux information key:redis-bits value:64
2019/11/18 21:00:34 [INFO] Aux information key:ctime value:1574082026
2019/11/18 21:00:34 [INFO] Aux information key:used-mem value:1148867432
2019/11/18 21:00:34 [INFO] db_size:809 expire_size:0
2019/11/18 21:00:35 [INFO] dbSyncer[1] total = 418.046MB - 59.008MB [ 14%] entry=64
2019/11/18 21:00:35 [INFO] dbSyncer[0] total = 435.740MB - 56.186MB [ 12%] entry=64
2019/11/18 21:00:35 [INFO] dbSyncer[2] total = 370.748MB - 120.159MB [ 32%] entry=76
2019/11/18 21:00:36 [INFO] dbSyncer[1] total = 418.046MB - 119.622MB [ 28%] entry=66
2019/11/18 21:00:36 [INFO] dbSyncer[0] total = 435.740MB - 120.283MB [ 27%] entry=65
2019/11/18 21:00:36 [INFO] dbSyncer[2] total = 370.748MB - 181.842MB [ 49%] entry=91
2019/11/18 21:00:37 [INFO] dbSyncer[1] total = 418.046MB - 174.327MB [ 41%] entry=77
2019/11/18 21:00:37 [INFO] dbSyncer[0] total = 435.740MB - 178.382MB [ 40%] entry=73
2019/11/18 21:00:37 [INFO] dbSyncer[2] total = 370.748MB - 234.867MB [ 63%] entry=97
2019/11/18 21:00:38 [INFO] dbSyncer[1] total = 418.046MB - 233.635MB [ 55%] entry=89
2019/11/18 21:00:38 [INFO] dbSyncer[0] total = 435.740MB - 240.732MB [ 55%] entry=85
2019/11/18 21:00:38 [INFO] dbSyncer[2] total = 370.748MB - 296.739MB [ 80%] entry=111
...
...
...
2019/11/18 21:01:44 [INFO] dbSyncer[0] total = 435.740MB - 435.740MB [100%] entry=809
2019/11/18 21:01:44 [INFO] dbSyncer[2] total = 370.748MB - 370.748MB [100%] entry=694
2019/11/18 21:01:44 [INFO] dbSyncer[2] total = 370.748MB - 370.748MB [100%] entry=694
2019/11/18 21:01:44 [INFO] dbSyncer[2] sync rdb done
2019/11/18 21:01:44 [INFO] dbSyncer[2] Event:IncrSyncStart Id:redis-shake
2019/11/18 21:01:44 [WARN] dbSyncer[2] GetFakeSlaveOffset not enable when psync == false
2019/11/18 21:01:45 [INFO] dbSyncer[1] total = 418.046MB - 418.046MB [100%] entry=784
2019/11/18 21:01:45 [INFO] dbSyncer[0] total = 435.740MB - 435.740MB [100%] entry=809
2019/11/18 21:01:45 [INFO] dbSyncer[2] sync: forwardCommands=8 filterCommands=0 writeBytes=32
2019/11/18 21:01:46 [INFO] dbSyncer[1] total = 418.046MB - 418.046MB [100%] entry=784
2019/11/18 21:01:46 [INFO] dbSyncer[0] total = 435.740MB - 435.740MB [100%] entry=809
2019/11/18 21:01:46 [INFO] dbSyncer[0] total = 435.740MB - 435.740MB [100%] entry=809
2019/11/18 21:01:46 [INFO] dbSyncer[0] sync rdb done
2019/11/18 21:01:46 [WARN] dbSyncer[0] GetFakeSlaveOffset not enable when psync == false
2019/11/18 21:01:46 [INFO] dbSyncer[0] Event:IncrSyncStart Id:redis-shake
2019/11/18 21:01:46 [INFO] dbSyncer[2] sync: forwardCommands=0 filterCommands=0 writeBytes=0
2019/11/18 21:01:46 [INFO] dbSyncer[1] total = 418.046MB - 418.046MB [100%] entry=784
2019/11/18 21:01:46 [INFO] dbSyncer[1] sync rdb done
2019/11/18 21:01:46 [WARN] dbSyncer[1] GetFakeSlaveOffset not enable when psync == false
2019/11/18 21:01:46 [INFO] dbSyncer[1] Event:IncrSyncStart Id:redis-shake
2019/11/18 21:01:47 [INFO] dbSyncer[0] sync: forwardCommands=8 filterCommands=0 writeBytes=32
2019/11/18 21:01:47 [INFO] dbSyncer[2] sync: forwardCommands=0 filterCommands=0 writeBytes=0
2019/11/18 21:01:47 [INFO] dbSyncer[1] sync: forwardCommands=8 filterCommands=0 writeBytes=32
2019/11/18 21:01:48 [INFO] dbSyncer[0] sync: forwardCommands=0 filterCommands=0 writeBytes=0
2019/11/18 21:01:48 [INFO] dbSyncer[2] sync: forwardCommands=0 filterCommands=0 writeBytes=0
2019/11/18 21:01:48 [INFO] dbSyncer[1] sync: forwardCommands=0 filterCommands=0 writeBytes=0
2019/11/18 21:01:49 [INFO] dbSyncer[0] sync: forwardCommands=1 filterCommands=0 writeBytes=4
全量在2019/11/18 21:00:35开始,在2019/11/18 21:01:47结束转为增量迁移,3GB的数据全量迁移的时间在72秒左右。
目标库2287个key