[CRIU] Optimize pre-dump algorithm

Andrei Vagin (C) avagin at gmail.com
Tue Jul 30 07:34:33 MSK 2019


pls use git send-email to send a series of patches. All patches have to
be in reply to the cover letter.

The cover letter should contain a description for a whole series.

You need to describe how you optimize pre-dump algorithm, give some
numbers how fast it is now, etc.

On Thu, Jul 25, 2019 at 06:48:00AM +0530, Abhishek Dubey wrote:
> [PATCH 1/6] Skip adding PROT_READ flag
> [PATCH 2/6] Skip generating iov for non PROT_READ region
> [PATCH 3/6] Drain memory using process_vm_readv syscall
> [PATCH 4/6] Adding new function cnt_sub
> [PATCH 5/6] Hack to handle vmsplice fail: resolve later
> [PATCH 6/6] Refactor time accounting macros
> 
> 
> Stats Dump:
> ===========
> 
> Optimized pre-dump:
> ===================
> 
> s
> === Run 1/1 ================ zdtm/transition/maps007
> ======================= Run zdtm/transition/maps007 in h
> =======================
> Start test
> Test is SUID
> ./maps007 --pidfile=maps007.pid --outfile=maps007.out
> Run criu pre-dump
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "dump": {
>                 "freezing_time": 227,
>                 "frozen_time": 81509,
>                 "memdump_time": 33139,
>                 "memwrite_time": 15374,
>                 "pages_scanned": 134211,
>                 "pages_skipped_parent": 0,
>                 "pages_written": 2626,
>                 "irmap_resolve": 0,
>                 "pages_lazy": 0,
>                 "page_pipes": 10,
>                 "page_pipe_bufs": 22,
>                 "shpages_scanned": 2,
>                 "shpages_skipped_parent": 0,
>                 "shpages_written": 2
>             }
>         }
>     ]
> }
> Run criu dump
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "dump": {
>                 "freezing_time": 216,
>                 "frozen_time": 173619,
>                 "memdump_time": 93012,
>                 "memwrite_time": 40636,
>                 "pages_scanned": 264466,
>                 "pages_skipped_parent": 45,
>                 "pages_written": 7019,
>                 "irmap_resolve": 0,
>                 "pages_lazy": 0,
>                 "page_pipes": 18,
>                 "page_pipe_bufs": 18,
>                 "shpages_scanned": 2,
>                 "shpages_skipped_parent": 0,
>                 "shpages_written": 2
>             }
>         }
>     ]
> }
> Run criu restore
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "restore": {
>                 "pages_compared": 184,
>                 "pages_skipped_cow": 176,
>                 "forking_time": 1209,
>                 "restore_time": 90484,
>                 "pages_restored": 6888
>             }
>         }
>     ]
> }
> Send the 15 signal to  38
> Wait for zdtm/transition/maps007(38) to die for 0.100000
> Wait for zdtm/transition/maps007(38) to die for 0.200000
> Removing dump/zdtm/transition/maps007/38
> ====================== Test zdtm/transition/maps007 PASS
> =======================
> 
> 
> Vanilla pre-dump:
> =================
> 
> criu at criu-gsoc:~/vanilla/criu$ sudo python test/zdtm.py run --pre 1 -t
> zdtm/transition/maps007 --show-stats
> === Run 1/1 ================ zdtm/transition/maps007
> ======================= Run zdtm/transition/maps007 in h
> =======================
> Start test
> Test is SUID
> ./maps007 --pidfile=maps007.pid --outfile=maps007.out
> Run criu pre-dump
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "dump": {
>                 "freezing_time": 225,
>                 "frozen_time": 112146,
>                 "memdump_time": 50245,
>                 "memwrite_time": 42774,
>                 "pages_scanned": 264402,
>                 "pages_skipped_parent": 0,
>                 "pages_written": 7120,
>                 "irmap_resolve": 0,
>                 "pages_lazy": 0,
>                 "page_pipes": 17,
>                 "page_pipe_bufs": 29,
>                 "shpages_scanned": 2,
>                 "shpages_skipped_parent": 0,
>                 "shpages_written": 2
>             }
>         }
>     ]
> }
> Run criu dump
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "dump": {
>                 "freezing_time": 212,
>                 "frozen_time": 168895,
>                 "memdump_time": 92811,
>                 "memwrite_time": 41312,
>                 "pages_scanned": 264541,
>                 "pages_skipped_parent": 50,
>                 "pages_written": 7296,
>                 "irmap_resolve": 0,
>                 "pages_lazy": 0,
>                 "page_pipes": 18,
>                 "page_pipe_bufs": 18,
>                 "shpages_scanned": 2,
>                 "shpages_skipped_parent": 0,
>                 "shpages_written": 2
>             }
>         }
>     ]
> }
> Run criu restore
> {
>     "magic": "STATS",
>     "entries": [
>         {
>             "restore": {
>                 "pages_compared": 637,
>                 "pages_skipped_cow": 631,
>                 "forking_time": 1254,
>                 "restore_time": 109873,
>                 "pages_restored": 6715
>             }
>         }
>     ]
> }
> Send the 15 signal to  38
> Wait for zdtm/transition/maps007(38) to die for 0.100000
> Wait for zdtm/transition/maps007(38) to die for 0.200000
> Removing dump/zdtm/transition/maps007/38
> ====================== Test zdtm/transition/maps007 PASS
> =======================


More information about the CRIU mailing list