jredis encounters heap space

11 views
Skip to first unread message

William Wu

unread,
Mar 22, 2012, 3:29:03 AM3/22/12
to Redis Clients Development
Now I'm testing redis-1.2.6 to inserting data whose size is about 15G,
with JRedis, but after inserting about one fortith of the whole data,
the program exits and throws exception of heap space. I've set heap
space to 5G.

Using command top to monitor the two processes, redis-server and java.
1. in the process of redis-server, VIRT: 6377M, RES 6.2G, SHR 344,
%MEM 26.4, this is the status of the end of the process, and
meanwhile, when I use the command of dbsize in the redis-cli, the last
number is not constant, even if it is still inserting the data into
redis. No doubt, the new data replace the old data. But in redis.conf,
I set maxmemory to 20G which is enough to collect all of the data
about 5G.

2. In the java, I set -Xms521m -Xmx5120m, and I think that java can
execute garbage collection in time. But when RES of the process gets
to about 5G, throwing heapspace and exiting.

Why and what I should do?
Thanks!
Reply all
Reply to author
Forward
0 new messages