why redis key always lost

924 views
Skip to first unread message

Olsen

unread,
Jan 28, 2015, 2:18:45 AM1/28/15
to redi...@googlegroups.com

hi 
I use redis sets by function SUNION、SINTER、SDIFF 
However sometimes,some keys disappear.sometimes it works good
I haven’t set expiration to those keys with my memory up to 8G
That means it couldn’t be possible that the keys disappear because of the insufficient of memory or expiration.
May i know the reason why the keys disappear??

# Server
redis_version:2.8.19
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:88e68de9b0f62c84
redis_mode:standalone
os:Linux 2.6.32-504.3.3.el6.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.7
process_id:28672
run_id:4bf75cd4674098e35eefb445a30d0233665f8163
tcp_port:6379
uptime_in_seconds:133019
uptime_in_days:1
hz:10
lru_clock:13142690
config_file:/usr/local/redis/conf/redis.conf

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:20548856
used_memory_human:19.60M
used_memory_rss:25493504
used_memory_peak:29243008
used_memory_peak_human:27.89M
used_memory_lua:35840
mem_fragmentation_ratio:1.24
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:2155958
rdb_bgsave_in_progress:0
rdb_last_save_time:1422295815
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
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:160761
total_commands_processed:11274552
instantaneous_ops_per_sec:11
total_net_input_bytes:3098951034
total_net_output_bytes:325528874
instantaneous_input_kbps:0.40
instantaneous_output_kbps:1.29
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:121586
evicted_keys:0
keyspace_hits:2366068
keyspace_misses:80999462
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:88.37
used_cpu_user:294.40
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Keyspace
db0:keys=103,expires=70,avg_ttl=1774558
db1:keys=1575,expires=466,avg_ttl=653701
db2:keys=44,expires=6,avg_ttl=31965362
db3:keys=2002,expires=1995,avg_ttl=31669626
db4:keys=7,expires=7,avg_ttl=172437

Olsen

unread,
Jan 28, 2015, 2:54:06 AM1/28/15
to redi...@googlegroups.com
i use redis monitor, no have del or srem command


在 2015年1月28日星期三 UTC+8下午3:18:45,Olsen写道:

Greg Andrews

unread,
Jan 28, 2015, 4:33:45 AM1/28/15
to redi...@googlegroups.com

On Tue, Jan 27, 2015 at 11:18 PM, Olsen <ol...@irs.ph> wrote:
I haven’t set expiration to those keys with my memory up to 8G


The output of your info shows keys are not being evicted from maxmemory settings, but are being expired from TTL:

# Stats
...
expired_keys:121586
evicted_keys:0
...

# Keyspace
db0:keys=103,expires=70,avg_ttl=1774558
db1:keys=1575,expires=466,avg_ttl=653701
db2:keys=44,expires=6,avg_ttl=31965362
db3:keys=2002,expires=1995,avg_ttl=31669626
db4:keys=7,expires=7,avg_ttl=172437


Why wouldn't the keys have expired due to TTL?

  -Greg

Reply all
Reply to author
Forward
0 new messages