]> git.saurik.com Git - redis.git/blobdiff - design-documents/VIRTUAL-MEMORY
new test added
[redis.git] / design-documents / VIRTUAL-MEMORY
index 7497d710c9485c3dc11f7ef3b73a3f6c6b4f19e5..ec4a9f841d71bf021448f3d3745ece90ae1c9b4c 100644 (file)
@@ -1,9 +1,9 @@
 - Use N working childs (fork at startup) in order to implement async I/O.
 - The swap file is opened at startup and unlink(2)-ed
-- Swap file free/used block bitmap is taken on memory
-- When a child is saving on background or rewriting the append only log the swap file gets freezed (no writes from the parent).
-- When Redis is low on memory keys not recently used and big enough will be trasnfered on Disk by one of the child processes doing async I/O. Only when the transfer finishes the parent will mark the value as swapped out and will free the associated value.
-- When Redis is going to process a command will first check that all the keys involved are in memory. If not will send a request to an async I/O child in order to load this keys in memory. When the operation finished Redis will "resume" the client opreation (just the client structure will hold the arguments of the suspended command, Redis will execute the command and unmask the read/write events in the client socket).
+- Swap file free/used blocks bitmap is taken in memory
+- When a child is saving on background or rewriting the append only log the swap file gets frozen (no writes from the parent).
+- When Redis is low on memory keys not recently used and big enough will be transfered on Disk by one of the child processes doing async I/O. Only when the transfer finishes the parent will mark the value as swapped out and will free the associated value (if didn't changed in the meantime).
+- When Redis is going to process a command will first check that all the keys involved are in memory. If not will send a request to an async I/O child in order to load this keys in memory. When the operation finished Redis will "resume" the client operation (just the client structure will hold the arguments of the suspended command, Redis will execute the command and unmask the read/write events in the client socket).
 - async I/O childs and parent communicate via pipes, so while Redis is blocked in the event loop can be resumed by an async child I/O just writing a message in the pipe.
 - Every Redis type should have a function to guess the max space needed to serialized an object.
 - The swap file is divided into blocks.