redis 請求慢
time redis-cli -h 127.0.0.1 -a 123456 ping
PONG
real 0m2.314s
user 0m0.000s
sys 0m0.002s
不是每次都慢,大概5、6次操作中會出現一次超過秒。以下是redis資訊
used_memory:3646312
used_memory_human:3.48M
used_memory_rss:10051584
used_memory_peak:4901784
used_memory_peak_human:4.67M
used_memory_lua:31744
mem_fragmentation_ratio:2.76
mem_allocator:jemalloc-3.2.0
# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
開啟redis的錯誤日誌,但沒有發現執行慢的指令。伺服器資訊
top - 12:28:07 up 18:18, 6 users, load average: 2.24, 2.17, 2.30
Tasks: 236 total, 1 running, 235 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.0%us, 1.4%sy, 0.0%ni, 87.6%id, 10.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8058088k total, 2601592k used, 5456496k free, 731772k buffers
Swap: 16777212k total, 0k used, 16777212k free, 621424k cached
這台伺服器是測試機,公司人員也不多,請求量不會大。伺服器tcp連線數維持在100以下。