a) Memory limit and physical size of dump.rdb; b) Convert .rdb ot AOF log

1,555 views
Skip to first unread message

Kirzilla

unread,
Oct 15, 2010, 1:44:12 PM10/15/10
to Redis DB
Hello,

Question #1:

Physical size of my dump.rdb is about ~50Mb.
maxmemory is set to 1573741824

redis> info
redis_version:1.3.15
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
process_id:13879
uptime_in_seconds:1210
uptime_in_days:0
connected_clients:2
connected_slaves:0
blocked_clients:0
used_memory:1074982504
used_memory_human:1.00G
changes_since_last_save:4733
bgsave_in_progress:0
last_save_time:1287163807
bgrewriteaof_in_progress:0
total_connections_received:55884
total_commands_processed:225022
expired_keys:4
hash_max_zipmap_entries:64
hash_max_zipmap_value:512
pubsub_channels:0
pubsub_patterns:0
vm_enabled:0
role:master
db0:keys=203394,expires=1
db1:keys=25550,expires=0
db2:keys=31625,expires=13
db13:keys=13,expires=0

So, as you can see database on disk takes only 50Mb, but the same
database in memory uses 1Gb. Is it ok? Why? Or my database is
corrupted or something like this? How can I fix it? How can I reduce
memory usage?

I've tried to run this dump.rdb on v.2.0.2 with the same maxmemory,
but all available memory was immediately taken and no write operation
were available (ERR command not allowed when used memory >
'maxmemory'). I've switched back to v.1.3.15 and now it's ok, but it
still takes too much memory (see INFO at the beginning of question).

......................................

Question #2:

Is it possible to convert existing .rdb into AOF log?


Thank you very much and sorry for my English!

Konstantin Merenkov

unread,
Oct 15, 2010, 3:08:29 PM10/15/10
to redi...@googlegroups.com
On Fri, Oct 15, 2010 at 9:44 PM, Kirzilla <kirz...@gmail.com> wrote:
> Question #2:
>
> Is it possible to convert existing .rdb into AOF log?
I think that'd be load rdb into redis (memory), then dump it as AOF file.


Sorry for not answering question #1, I don't know.


--
Best Regards,
Konstantin Merenkov

Favo Yang

unread,
Oct 15, 2010, 9:47:02 PM10/15/10
to redi...@googlegroups.com
1. It's common to see a 10:1 memory vs disk dump ratio 
2. See http://wanderr.com/jay/redis-converting-from-rdb-to-aof/2010/05/27/


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.


Kirzilla

unread,
Oct 17, 2010, 5:26:41 AM10/17/10
to Redis DB
Hello,

1. 10:1 memory vs disk dump ratio is ok, but I have 50Mb database on
disk
and about 1Gb in memory and it is growing (ratio is about 1:20).
Is there any ways to check dump file?

I see everybody is talking about different redis utilities, but where
can I find them?

2. Thank you for link, now it is clear for me.

On Oct 16, 5:47 am, Favo Yang <favoy...@gmail.com> wrote:
> 1. It's common to see a 10:1 memory vs disk dump ratio
> 2. Seehttp://wanderr.com/jay/redis-converting-from-rdb-to-aof/2010/05/27/
> > redis-db+u...@googlegroups.com<redis-db%2Bunsubscribe@googlegroups.c om>
> > .

Favo Yang

unread,
Oct 17, 2010, 5:42:16 AM10/17/10
to redi...@googlegroups.com
redis-check-dump can check your dump file. If you really worry about something goes wrong, restore dump file to a backup redis and test it.

To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.

Kirzilla

unread,
Oct 17, 2010, 6:22:31 AM10/17/10
to Redis DB
Thank you, but where can I get redis-check-dump?
> > <redis-db%2Bunsubscr...@googlegroups.c om>

Konstantin Merenkov

unread,
Oct 17, 2010, 8:46:26 AM10/17/10
to redi...@googlegroups.com
On Sun, Oct 17, 2010 at 2:22 PM, Kirzilla <kirz...@gmail.com> wrote:
> Thank you, but where can I get redis-check-dump?

It is shipped with latest redis. Compile latest version and you will
have redis-check-dump.

Reply all
Reply to author
Forward
0 new messages