Redis swap issue while save

(Same issue is known as "Redis double memory" or "Redis twice memory")

Redis do not swap. However sometimes system administrators may see that the load average of the redis machine spkes through the roof and machine swaps, withot a reason.

Reason is the way redis save the information. When save time commes, redis forks, the child process saves and exits.

Let suppose we have a machine with 8 GB RAM and 1 redis with 7 GB RAM. This means that for operating system we have 1 GB RAM. At the time of save, afther the fork operation, there is 2 redis processes, each with 7 GB RAM. Sincse 7 + 7 + 1 is bigger than 8, the machine should swap somewhere 7 GB. System administrator must make sure that the system will have enought swap.

Here you are easiest way to add swap under Linux, if you have no way to create new swap partition.

Note that in case of redis, the higher load average and swap is not affecting the redis performance. However if you have other services there such webserver or MySQL, their performance may suffer a bit.


blog comments powered by Disqus





Articles library

Redis as session handler in PHP

How to use Redis for session handler in PHP in a way similar to msession or PostgreSQL sessions
Date: 2011-07

Tags: system administration php


Lazy starter script on Linux such Redhat CentOS or Fedora

How to quickly made Redis to start after Linux boot.
Date: 2011-07

Tags: system administration


Redis vs Memcached comparison

Here is basic comparison of Redis Memcached and Memcachedb.
Date: 2011-07

Tags: memcached


Why RDBMS and SQL are difficult...

...while sometimes NoSQL solution may be easier and way faster? This arcle deals with incremental counters and how they needs to be implemented properly in RDBMS-es such MySQL
Date: 2011-07
Updated: 2011-09-30

Tags: anti-pattern programming mysql


Seamless migration from one Redis server to another

How to use replication to migrate Redis server without service interruption
Date: 2011-07

Tags: system administration


Redis swap issue while save

Explanation why your server load average may spike and server to swap memory when running redis
Date: 2011-08-21

Tags: system administration


Amazon EC2 and Amazon ElastiCache service

Memcached at Amazon first impressions
Date: 2011-08-23

Tags: system administration memcached cloud


Understanding hash-max-zipmap-entries and 'hash of hashes' optimization

Explanation of config parameters such hash-max-zipmap-entries and how we can make huge memory savings in new Redis 2.2
Date: 2011-08-28

Tags: optimization system administration programming php


NoSQL database design example

This article explains how we made our article section
Date: 2011-09-02

Tags: database design programming mysql


Redis save and backup script

Simple backup script for Redis
Date: 2011-09-28

Tags: system administration optimization


Postgres 9.1 foreign data wrapper interface

Postgres 9.1 gives you ability to access data from different data sources including Redis
Date: 2011-10-20

Tags: programming mysql pgsql memcached optimization


Redis high traffic connection issue

Explanation on 'Cannot assign requested address' connection error
Date: 2011-11-12

Tags: optimization system administration scaling


Redis too many open files error on high traffic sites

Explanation on 'Accepting client connection: accept: Too many open files'
Date: 2011-12-21

Tags: system administration memcached security


PHP Redis bug with PHP 5.4

Description of bug PHP Redis bug
Date: 2012-07-02

Tags: system administration php


Case Study: Using Redis intersect on very large sets

Intersection of 2 x 120M MySQL records
Date: 2012-08-29

Tags: programming mysql optimization cloud php


Getting started with Python and Redis on CentOS 6.X

How to install and test Redis client for Python on CentOS
Date: 2013-03-21

Tags: system administration python


GeoIP in Redis

Put Maxmind's GeoIP in Redis for best berformance for cient apps written in PHP or Python
Date: 2013-03-24

Tags: programming mysql optimization php scaling python


Redis database file examination

Examination of Redis rdb file in order to find huge memory consumption
Date: 2013-08-23

Tags: optimization system administration


© Jul.2011 - 2017, E-Nick.org