Changes

1,334 bytes added ,  17:56, 28 January 2015
Line 35: Line 35:  
== Advanced C/R ==
 
== Advanced C/R ==
   −
For such things as stackable images and incremental dumps CRIU supports a more sophisticated memory C/R policies rather than "dump all -- restore all" one. There are several CLI knobs that affect this question.
+
For such things as remote dump, stackable images and incremental dumps CRIU supports a more sophisticated memory C/R policies rather than "dump all -- restore all" one. There are several CLI knobs that affect this question.
    +
* dump action
 
* pre-dump action
 
* pre-dump action
 
* --track-mem option
 
* --track-mem option
* --prev-images-dir option
+
** --prev-images-dir option
 
* --leave-running option
 
* --leave-running option
 +
* --page-server option
 +
 +
Let's see what all of this means.
 +
 +
First of all, the pre-dump action always turns on the <code>--track-mem</code> and the <code>--leave-running</code> options even if they are not specified in the command line. Next, the pre-dump action dumps ''only'' the memory, while the dump one dumps all the state including open files, sockets and other stuff. Having said that, let's see all the possible combinations and what they result in.
 +
 +
;dump
 +
:Without any options till will dump everything and kill the dumped tasks.
 +
 +
;dump --track-mem
 +
:Will dump everything, will turn on memory changes tracking and will kill tasks after this. As you might have noticed this is pretty useless combination of options.
 +
 +
;dump --leave-running
 +
:Will dump everything and leave the tasks running after dump.
 +
 +
;dump --track-mem --leave-running
 +
:Same as above, but will turn on memory changes tracking.
 +
 +
;dump --track-mem --leave-running --prev-images-dir <path>
 +
:Same as above, but during dump will also check whether the page in question is present in parent and would skip dumping it this time.
 +
 +
;pre-dump
 +
:Will dump only the memory, turn on memory changes tracking and leave tasks running
 +
 +
;pre-dump --prev-images-dir <path>
 +
:Same as above, but will check for pages present in parent and would skip them.