0%

redis之超时排查

Redis持久化RDB方式,是指在指定的时间间隔内将内存中的数据集快照写入磁盘,实际操作过程是fork一个子进程,先将数据集写入临时文件,写入成功后再替换之前的文件,用二进制压缩存储。

一、判断标准

  1. –latency--intrinsic-latency num
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


>./redis-cli --intrinsic-latency 100
Max latency so far: 1 microseconds.
Max latency so far: 10 microseconds.
Max latency so far: 12 microseconds.
Max latency so far: 56 microseconds.
Max latency so far: 152 microseconds.
Max latency so far: 250 microseconds.
Max latency so far: 1519 microseconds.
Max latency so far: 5605 microseconds.
Max latency so far: 10096 microseconds.
Max latency so far: 30747 microseconds.
Max latency so far: 31746 microseconds.

Max latency so far: 46306 microseconds.

1441320883 total runs (avg latency: 0.0694 microseconds / 69.38 nanoseconds per run).
Worst run took 667418x longer than the average latency.

二、如何避免

三、参考

  1. 参考一
  2. 参考二