Skip to content
This repository

Direct Virtual Memory FAQ to the FAQ doc, which indicates that it's depr... #96

Closed
wants to merge 1 commit into from

2 participants

Issac Kelly Damian Janowski
Issac Kelly

...ecated.

I have no idea if that is how you want to handle it or not, but right now the FAQ and the virtual memory doc are out of date with each other.

Damian Janowski djanowski closed this December 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 01, 2012
Issac Kelly Direct Virtual Memory FAQ to the FAQ doc, which indicates that it's d…
…eprecated.
e4d8917
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 28 deletions. Show diff stats Hide diff stats

  1. 29  topics/faq.md
29  topics/faq.md
Source Rendered
@@ -139,34 +139,7 @@ disks.
139 139
 
140 140
 ## Do you plan to implement Virtual Memory in Redis? Why don't just let the Operating System handle it for you?
141 141
 
142  
-Yes, in order to support datasets bigger than RAM there is the plan to
143  
-implement transparent Virtual Memory in Redis, that is, the ability to transfer
144  
-large values associated to keys rarely used on Disk, and reload them
145  
-transparently in memory when this values are requested in some way.
146  
-
147  
-So you may ask why don't let the operating system VM do the work for us. There
148  
-are two main reasons: in Redis even a large value stored at a given key, for
149  
-instance a 1 million elements list, is not allocated in a contiguous piece of
150  
-memory. It's actually *very* fragmented since Redis uses quite aggressive
151  
-object sharing and allocated Redis Objects structures reuse.
152  
-
153  
-So you can imagine the memory layout composed of 4096 bytes pages that actually
154  
-contain different parts of different large values. Not only, but a lot of
155  
-values that are large enough for us to swap out to disk, like a 1024k value, is
156  
-just one quarter the size of a memory page, and likely in the same page there
157  
-are other values that are not rarely used. So this value wil never be swapped
158  
-out by the operating system.  This is the first reason for implementing
159  
-application-level virtual memory in Redis.
160  
-
161  
-There is another one, as important as the first. A complex object in memory
162  
-like a list or a set is something *10 times bigger* than the same object
163  
-serialized on disk. Probably you already noticed how Redis snapshots on disk
164  
-are damn smaller compared to the memory usage of Redis for the same objects.
165  
-This happens because when data is in memory is full of pointers, reference
166  
-counters and other metadata. Add to this malloc fragmentation and need to
167  
-return word-aligned chunks of memory and you have a clear picture of what
168  
-happens. So this means to have 10 times the I/O between memory and disk than
169  
-otherwise needed.
  142
+See the Virtual Memory topic document.
170 143
 
171 144
 ## Is there something I can do to lower the Redis memory usage?
172 145
 
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.