Redis is taking about 6GB of RAM on startup

68 views
Skip to first unread message

Chinmay Mukhopadhyay

unread,
Jul 20, 2016, 1:22:17 AM7/20/16
to Redis DB

So my Redis db has one major hashmap. It contains 8,000,000 records. The size of the dump.rdb file is 2.8 GB.
As soon as I start the redis-server, the RAM usage by redis peaks to 6GB and remains in that state. Since my computer has 8GB RAM installed, I am not being able to insert any more records in the redis db. Every time I do that, I get a JedisConnectionException.
Is this RAM consumption normal? Is there something I can do to reduce this?

Here are some screenshots for your reference:

The RAM usage stats:-

image

The startup time for redis-db:-

image


This is the exception that I am getting:-

image

This is the error I get when I try to insert more data:-

image

Jedis version:

2.8.1

Redis version:

3.0.501

Java version:

1.7.079

CharSyam

unread,
Jul 20, 2016, 1:24:49 AM7/20/16
to redi...@googlegroups.com
if your rdbcompress is yes?
then it is possible.
may be add some more physical memory for loading it 

--
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+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Chinmay Mukhopadhyay

unread,
Jul 20, 2016, 1:35:15 AM7/20/16
to Redis DB
Yes the rdbcompress option is set as 'yes'.
But isn't it turned on so that the size taken is reduced? If I turn it off, then the memory taken will be huge.
Other than adding RAM, is there anything that I can do? Like VM Swapping?

CharSyam

unread,
Jul 20, 2016, 1:45:27 AM7/20/16
to redi...@googlegroups.com
if rdbcompression is yes
Redis compressed real data when redis save it to disk. so rdb is 2.8G, its real size is much bigger than 2.8G


--

Javier Guerra Giraldez

unread,
Jul 20, 2016, 5:28:33 AM7/20/16
to redi...@googlegroups.com
On 20 July 2016 at 06:35, Chinmay Mukhopadhyay <chinm...@gmail.com> wrote:
> Other than adding RAM, is there anything that I can do? Like VM Swapping?


VM swapping turns Redis into a seriously unoptimal disk-based database.

If the amount of RAM you want to use is smaller than your data, then
it would be wiser to use a database actually designed to use disk.

--
Javier
Reply all
Reply to author
Forward
0 new messages