Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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

Using Swap


There is a Linux kernel parameter called swappiness that controls when the operating system will start using the swap space. This parameter can be set to values between 0 and 100. A lower value tells the kernel to use the swap space less frequently, and a higher value tells it to use the swap space more frequently. The default value is 60.

Here are some special cases of using swaps:

Value

Strategy

vm.swappiness = 0

  • Linux 3.5 and newer: Disables swap entirely

  • Linux 3.4 and older: Swap only to avoid an "out of memory" condition

vm.swappiness = 1

  • Linux 3.5 and newer: Minimum amount of swapping without disabling it entirely

vm.swappiness = 100

  • Linux will swap aggressively

In a scenario where Redis needs to access from the swap space, the OS needs to move the necessary pages back into the RAM. During this process, Redis is blocked until the OS finishes its job.

We recommend that you use a swappiness of 0 when your data always fits into the RAM and 1 when you are not sure...

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 €18.99/month. Cancel anytime