Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redis Essentials

You're reading from   Redis Essentials Harness the power of Redis to integrate and manage your projects efficiently

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781784392451
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Not planning and configuring the memory properly


The Redis server needs enough memory to perform backups if any strategy is enabled. In the worst-case scenario, redis-server may double the used memory during the backup.

During RDB snapshot creation and AOF rewriting, redis-server needs to duplicate itself (it executes the fork() system call). Chapter 8, Scaling Redis (Beyond a Single Instance), will introduce AOF and RDB, with details.

If the Redis instance is very busy during the fork() call, it is possible that the copy-on-write strategy and overcommitting the memory is not enough. In this case, the child process may need the same amount of memory (or an amount very close to it) as the parent.

Assuming that Linux is the operating system, set the overcommit memory configuration to 1 to boost background saves. Add the following to the /etc/sysctl.conf file:

vm.overcommit_memory=1

After saving /etc/sysctl.conf, reboot the server.

There is a configuration directive called maxmemory that limits the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image