malloc

Redis using 2GB of memory on 70MB data set - the fix

For Ariejan.net I use redis to cache pages and shards. This works great and all, but today I noticed something alarming: redis Running 3d 12h 4m 0.0% 45.2% [1829556 kB] Yes, that’s about 1.7 GB of RAM. That’s way too much for what I cache. Let’s see what redis has to say for itself: $ redis-cli redis 127.0.0.1:6379> info redis_version:2.2.12 ... connected_clients:5 connected_slaves:0 used_memory:71626608 used_memory_human:68.31M used_memory_rss:1873465344 mem_fragmentation_ratio:26.16 Well, that’s awkward.