Redis server shutdown with out of memory error when its memory usage reaches around 2GB.

749 views
Skip to first unread message

nephilim

unread,
Sep 15, 2011, 5:12:07 AM9/15/11
to Redis DB
Hello.

I've installed Redis 2.2.11-1 on AIX 5.3 using rpm.
(http://www.perzl.org/aix/index.php?n=Main.Redis)

Trying to put about 2GB data to the Redis server via Java client(jedis
2.0.0), the Redis server
shut down with message saying
"zmalloc: Out of memory trying to allocate 2xx bytes."
when its memory usage reaches about "2GB".

I can't find out reason. Are there any solutions that I can try?

- the AIX server has 8GB physical memory and keep more than 4GB free
memory
- out of memory error always pop out after consume about 1.8G
- I've checked max memory configuration in redis.conf.
- comment all 'save' configuration to ensure not forking 'dump.rdb'
child process.
(referred to http://redis.io/topics/faq)

Thanks in advance.

Pieter Noordhuis

unread,
Sep 15, 2011, 6:55:51 AM9/15/11
to redi...@googlegroups.com
This is likely a 32-bit binary, which can address no more than 2GB of
memory. You can try building a 64-bit binary of Redis yourself and try
again.

Cheers,
Pieter

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

nephilim

unread,
Sep 16, 2011, 10:02:14 AM9/16/11
to Redis DB
Thanks, Noordhuis.
Using the info command of cli, I could check it was "arch_bits:32".

So I built 64-bit rpm of Redis for AIX using source rpm at perzl.org.
(add -maix64 option to gcc and so on.)

At first, it seems to work fine. But like before, Redis crashes when
it reaches certain amount of data. The Java client was just doing
simple set-string-value operation.

- msg in stderr

[360638] 16 Sep 22:53:22 - DB 0: 4086652 keys (0 volatile) in 4194304
slots HT.
[360638] 16 Sep 22:53:22 - 1 clients connected (0 slaves), 1603537056
bytes in use
zmalloc: Out of memory trying to allocate 282 bytes
IOT/Abort trap(coredump)

- nmon result is (the server has enough memory)

Physical PageSpace | pages/sec In Out |
FileSystemCache
% Used 39.7% 1.6% | to Paging Space 0.0 0.0 |
(numperm) 25.7%
% Free 60.3% 98.4% | to File System 0.0 1.0 |
Process 6.9%
MB Used 3249.5MB 401.4MB | Page Scans 0.0 |
System 7.1%
MB Free 4942.5MB 24686.6MB | Page Cycles 0.0 |
Free 60.3%
Total(MB) 8192.0MB 25088.0MB | Page Steals 0.0
| -----
| Page Faults 0.0 |
Total 100.0%

- 64-bit re-compiled Redis server INFO follows.

redis_version:2.2.11
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:select
process_id:614540
uptime_in_seconds:579
uptime_in_days:0
lru_clock:1594227
used_cpu_sys:0.06
used_cpu_user:0.06
used_cpu_sys_childrens:0.00
used_cpu_user_childrens:0.00
connected_clients:1
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:708512
used_memory_human:691.88K
used_memory_rss:708512
mem_fragmentation_ratio:1.00
use_tcmalloc:0
loading:0
aof_enabled:0
changes_since_last_save:0
bgsave_in_progress:0
last_save_time:1316175931
bgrewriteaof_in_progress:0
total_connections_received:2
total_commands_processed:1
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
hash_max_zipmap_entries:512
hash_max_zipmap_value:64
pubsub_channels:0
pubsub_patterns:0
vm_enabled:0
role:master
allocation_stats:
6=1,7=1,8=9,9=22,10=60,11=65,12=13,13=36,14=24,15=41,16=10159,17=11,18=6,19=16,20=7,21=4,22=7,23=11,24=127,25=2,26=8,27=4,28=4,29=7,30=6,31=4,32=6,34=5,35=1,36=4,37=7,38=5,39=7,40=7,41=3,42=2,43=2,44=3,45=1,46=1,47=1,48=15,49=2,50=1,51=1,52=1,53=2,56=5,57=2,58=3,59=5,61=1,62=1,63=1,64=7,65=3,66=1,67=1,68=4,69=4,70=2,71=3,72=6,73=5,74=3,75=2,76=3,77=3,78=7,79=9,80=13,81=18,82=21,83=12,84=26,85=20,86=16,87=12,88=76,89=10,90=3,128=3,>=256=16


On 9월15일, 오후7시55분, Pieter Noordhuis <pcnoordh...@gmail.com> wrote:
> This is likely a 32-bit binary, which can address no more than 2GB of
> memory. You can try building a 64-bit binary of Redis yourself and try
> again.
>
> Cheers,
> Pieter
>
>
>
>
>
>
>
> On Thu, Sep 15, 2011 at 11:12 AM, nephilim <i015...@gmail.com> wrote:
> > Hello.
>
> > I've installed Redis 2.2.11-1 on AIX 5.3 using rpm.
> > (http://www.perzl.org/aix/index.php?n=Main.Redis)
>
> > Trying to put about 2GB data to the Redis server via Java client(jedis
> > 2.0.0), the Redis server
> > shut down with message saying
> >  "zmalloc: Out of memory trying to allocate 2xx bytes."
> > when its memory usage reaches about "2GB".
>
> > I can't find out reason. Are there any solutions that I can try?
>
> > - the AIX server has 8GB physical memory and keep more than 4GB free
> > memory
> > - out of memory error always pop out after consume about 1.8G
> > - I've checked max memory configuration in redis.conf.
> > - comment all 'save' configuration to ensure not forking 'dump.rdb'
> > child process.
> >  (referred tohttp://redis.io/topics/faq)

Greg Andrews

unread,
Sep 17, 2011, 6:34:41 AM9/17/11
to redi...@googlegroups.com
After you installed the 64-bit rpm, you started the Redis server, right?  So the Redis process would have inherited the ulimit settings from your login session.

Are any of those limited to 2GB?  The "ulimit -d", "ulimit -H -d", "ulimit -m" and "ulimit -H -m" settings would be the most interesting.

  -Greg
Reply all
Reply to author
Forward
0 new messages