Problem with restart redis with vm feature on

255 views
Skip to first unread message

xiuguang tan

unread,
Mar 28, 2011, 10:40:14 PM3/28/11
to redi...@googlegroups.com
Hi
I try to restart my redis server, but it fails when vm-enabled is set to "yes". If I change the vm-enabled to "no", it's ok.
The problem is that, before restarting the vm feature is enabled. If I restart the server with vm-enabled "no", the swapped data is lost.

I am using Redis version 2.2.2. Here is some system INFO:

15G Mar 29 09:00 dump.rdb
4.0G Mar 28 22:33 redis.swap

[4782] 29 Mar 09:38:50 * Using '/opt/redis.swap' as swap file
[4782] 29 Mar 09:38:50 * Allocating 4294967296 bytes of swap file
[4782] 29 Mar 09:38:50 * Swap file allocated with success
[4782] 29 Mar 09:38:50 - Allocated 16777216 bytes page table for 134217728 pages
[4782] 29 Mar 09:38:50 * Server started, Redis version 2.2.2
[4782] 29 Mar 09:38:55 - Accepted 127.0.0.1:35993
[4782] 29 Mar 10:18:38 - Accepted 127.0.0.1:35994
[4782] 29 Mar 10:18:38 - Client closed connection

redis>
redis> get 1
(error) LOADING Redis is loading the dataset in memory
redis> get 1
(error) LOADING Redis is loading the dataset in memory
redis> get 1
(error) LOADING Redis is loading the dataset in memory
(444.35s)
redis> get 1
(error) LOADING Redis is loading the dataset in memory
(624.55s)

Here is my conf file:
daemonize no
pidfile /var/run/redis.pid
port 6379
timeout 3000
loglevel verbose
logfile stdout
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb
dir ./
slave-serve-stale-data yes
appendonly no
appendfsync everysec
no-appendfsync-on-rewrite no
vm-enabled yes
vm-swap-file /opt/redis.swap
vm-max-memory 5931556000
vm-page-size 32
vm-pages 134217728
vm-max-threads 4
hash-max-zipmap-entries 256
hash-max-zipmap-value 1024
list-max-ziplist-entries 512
list-max-ziplist-value 64
set-max-intset-entries 512
activerehashing yes

Salvatore Sanfilippo

unread,
Mar 29, 2011, 3:53:12 AM3/29/11
to redi...@googlegroups.com, xiuguang tan
It is not failing, it just takes ages...

VM is slow to load and save the dataset at the point the next major
version of Redis (2.4 probably) will not have support for VM.
We recommend using Redis in-memory, without swap file. At the same
time we are investigating other possible ways to handle big datasets.
One is Redis Cluster that will be released as soon as it is complete,
I'm working on it a lot.
Another is diskstore, an alternative to Redis Virtual Memory that I
and Pieter are trying to push forward but that is considered an
experimental project, that is, we want to be 100% sure it is working
well before releasing a stable version of Redis with diskstore.

All this means that 2.4 will not support VM for sure, but will support
either diskstore, cluster, or both, depending on what is the first
feature that will reach stability / maturity.

Cheers,
Salvatore

> --
> 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.
>

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Reply all
Reply to author
Forward
0 new messages