Romber Li
2018-11-14 09:14:08 UTC
Hi all,
We are facing a problem that a very small key(even 100bytes) may cost over 100ms, even 1000ms.
Although not all operation will use that much time,
But that may happen tens or hundreds times a day.
this key cost 11.325ms and it's only a 495bytes string type key.
We use 48C/128G server as host machine, on that we run two 4C/32G virtual machines as redis server,
And run two instances on each virtual machine, each redis instance has 12GB RAM.
We also disabled THP and swap, no other heavy service running on the virtual machines, except monitoring agent, such as Zabbix agent, devops agent, pmm agent(percona monitoring and management)⊠etc.
Workload on redis server is not heavy, ops is less than 10000,
Both of RDB and AOF are disabled,
We dump an RDB file every night on slave node, in order to analyze key size,
We use redis server 4.0.8, and use volatile-lfu as key evict strategy,
and the only reason I guess is the evict strategy, though I don't have any provement.
any help is welcomed, thanks in advance.
Here is the output of INFO command:
# Server
redis_version:4.0.8
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:2bedfbe6a617df94
redis_mode:cluster
os:Linux 3.10.0-862.9.1.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:8201
run_id:7949cca0c8746f22cc799fd63f396b20864a280b
tcp_port:7001
uptime_in_seconds:510290
uptime_in_days:5
hz:10
lru_clock:15452891
executable:/data/xxx/xxx/redis-server
config_file:/data/xxx/xxx/redis.conf
# Clients
connected_clients:307
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:1614857128
used_memory_human:1.50G
used_memory_rss:1727164416
used_memory_rss_human:1.61G
used_memory_peak:1665041808
used_memory_peak_human:1.55G
used_memory_peak_perc:96.99%
used_memory_overhead:220949002
used_memory_startup:1442768
used_memory_dataset:1393908126
used_memory_dataset_perc:86.39%
total_system_memory:33567760384
total_system_memory_human:31.26G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:12884901888
maxmemory_human:12.00G
maxmemory_policy:volatile-lfu
mem_fragmentation_ratio:1.07
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0
I uploaded some screenshot of monitor data, you can see that workload is not high.
We are facing a problem that a very small key(even 100bytes) may cost over 100ms, even 1000ms.
Although not all operation will use that much time,
But that may happen tens or hundreds times a day.
this key cost 11.325ms and it's only a 495bytes string type key.
We use 48C/128G server as host machine, on that we run two 4C/32G virtual machines as redis server,
And run two instances on each virtual machine, each redis instance has 12GB RAM.
We also disabled THP and swap, no other heavy service running on the virtual machines, except monitoring agent, such as Zabbix agent, devops agent, pmm agent(percona monitoring and management)⊠etc.
Workload on redis server is not heavy, ops is less than 10000,
Both of RDB and AOF are disabled,
We dump an RDB file every night on slave node, in order to analyze key size,
We use redis server 4.0.8, and use volatile-lfu as key evict strategy,
and the only reason I guess is the evict strategy, though I don't have any provement.
any help is welcomed, thanks in advance.
Here is the output of INFO command:
# Server
redis_version:4.0.8
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:2bedfbe6a617df94
redis_mode:cluster
os:Linux 3.10.0-862.9.1.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:8201
run_id:7949cca0c8746f22cc799fd63f396b20864a280b
tcp_port:7001
uptime_in_seconds:510290
uptime_in_days:5
hz:10
lru_clock:15452891
executable:/data/xxx/xxx/redis-server
config_file:/data/xxx/xxx/redis.conf
# Clients
connected_clients:307
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:1614857128
used_memory_human:1.50G
used_memory_rss:1727164416
used_memory_rss_human:1.61G
used_memory_peak:1665041808
used_memory_peak_human:1.55G
used_memory_peak_perc:96.99%
used_memory_overhead:220949002
used_memory_startup:1442768
used_memory_dataset:1393908126
used_memory_dataset_perc:86.39%
total_system_memory:33567760384
total_system_memory_human:31.26G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:12884901888
maxmemory_human:12.00G
maxmemory_policy:volatile-lfu
mem_fragmentation_ratio:1.07
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0
I uploaded some screenshot of monitor data, you can see that workload is not high.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.