P
P
Pedro-Gansales2019-02-15 13:04:21
Redis
Pedro-Gansales, 2019-02-15 13:04:21

Redis works great at first, but then it slows down wildly at 100% CPU?

I use Redis as a temporary cache for 1 day, without saving snapshots. Website with over 50k traffic. Initially, I start the radish and it works quickly - as it should, but then after about an hour it rests on 100% CPU and starts to slow down furiously. I restart and it works great again. I heard that it is possible because of the deleted keys, some kind of garbage accumulates ... I don’t know where to go.

INFO

# Server
redis_version:5.0.0
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:589bbec69921e7d1
redis_mode:standalone
os:Linux 4.4.0-142-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:5.4.0
process_id:10690
run_id:2bf978f1c4ac625d6f476055026dee521a6e2be6
tcp_port:6379
uptime_in_seconds:633
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:6720524
executable:/root/redis-server
config_file:/etc/redis/redis.conf
# Clients
connected_clients:7
client_recent_max_input_buffer:215082
client_recent_max_output_buffer:102496
blocked_clients:0
# Memory
used_memory:626516840
used_memory_human:597.49M
used_memory_rss:619220992
used_memory_rss_human:590.54M
used_memory_peak:626679184
used_memory_peak_human:597.65M
used_memory_peak_perc:99.97%
used_memory_overhead:5102146
used_memory_startup:791928
used_memory_dataset:621414694
used_memory_dataset_perc:99.31%
allocator_allocated:627069472
allocator_active:649281536
allocator_resident:657899520
total_system_memory:16826458112
total_system_memory_human:15.67G
used_memory_lua:13079552
used_memory_lua_human:12.47M
used_memory_scripts:3805152
used_memory_scripts_human:3.63M
number_of_cached_scripts:7252
maxmemory:1200000000
maxmemory_human:1.12G
maxmemory_policy:allkeys-lru
allocator_frag_ratio:1.04
allocator_frag_bytes:22212064
allocator_rss_ratio:1.01
allocator_rss_bytes:8617984
rss_overhead_ratio:0.94
rss_overhead_bytes:18446744073670873088
mem_fragmentation_ratio:0.99
mem_fragmentation_bytes:18446744073702256816
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:151170
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
# Persistence
loading:0
rdb_changes_since_last_save:21619
rdb_bgsave_in_progress:0
rdb_last_save_time:1550223763
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
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
aof_last_cow_size:0
# Stats
total_connections_received:3976
total_commands_processed:28536173
instantaneous_ops_per_sec:70602
total_net_input_bytes:553074494
total_net_output_bytes:102416450
instantaneous_input_kbps:887.71
instantaneous_output_kbps:58.73
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:28500429
keyspace_misses:2099
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
# Replication
role:master
connected_slaves:0
master_replid:0c163b3898c1ce935bbf4a1938a635c22422c5f2
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
# CPU
used_cpu_sys:3.392000
used_cpu_user:71.864000
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
# Cluster
cluster_enabled:0
# Keyspace
db0:keys=7209,expires=0,avg_ttl=0

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2019-02-15
@2ord

Install a monitoring system (munin) and watch the parameters.
On the observed server - munin-node.

A
Alexander Aksentiev, 2019-02-15
@Sanasol

To begin with, you need to look at the logs, and not throw out the config here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question