[CRIU] [PATCH v2 0/6] dirty pages logger on pre-dump

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Fri May 27 01:01:44 PDT 2016


This logs dirty pages changes while sending memory to other end
on pre-dump, thus users can estimate patterns of memory saturation
for dumped process tree in total. That for instance can help in
taking the decision of do or not to do next iteration for iterative
migration. If we see that on next iteration average dirty memory
size will exceed what we have now we might need to stop iterations.

We might need it in https://jira.sw.ru/browse/PSBM-41029

v2: add help, use protobuf service image, merge sleep_us to where it
is used

* On my node walking one time across 0,5Gb of pages takes aproximately
~0.01 sec; on 10 Gbit/sec network the transfer time will be ~ 0.4 sec.
So we will have approximately 3 such measurements. On my node for local
transfer, I got >= 10 measurements in test:

"test/zdtm.py run --page-server --pre 1 -k always -t zdtm/static/maps04"

So may be weneed a faster way to walk dirty bitmap to have more
informative data, may be some bitmap for bitmap, but that will need
changes in kernel, so for now - try to live with what we have.

Pavel Tikhomirov (6):
  opts/rpc/lib: add log-dirty option to criu
  pre-dump: add dirty memory statistics logger thread
  log_dirty: add dirty-log to save dirty memory pages stats
  make timediff reusable
  log_dirty: add log_dirty_total - get total amount of dirty memory
    pages
  log_dirty: count dirty pages for one pid in pagemap

 criu/Makefile.crtools        |   1 +
 criu/cr-dump.c               |  36 ++++++-
 criu/cr-service.c            |   3 +
 criu/crtools.c               |   9 ++
 criu/dirty-logger.c          | 235 +++++++++++++++++++++++++++++++++++++++++++
 criu/image-desc.c            |   6 ++
 criu/include/cr_options.h    |   1 +
 criu/include/dirty-logger.h  |   6 ++
 criu/include/image-desc.h    |   2 +
 criu/include/log.h           |   3 +
 criu/include/magic.h         |   1 +
 criu/include/protobuf-desc.h |   1 +
 criu/log.c                   |   2 +-
 images/rpc.proto             |   1 +
 images/stats.proto           |   7 ++
 lib/c/criu.c                 |  11 ++
 lib/c/criu.h                 |   2 +
 lib/py/images/images.py      |   3 +-
 18 files changed, 327 insertions(+), 3 deletions(-)
 create mode 100644 criu/dirty-logger.c
 create mode 100644 criu/include/dirty-logger.h

-- 
2.5.5



More information about the CRIU mailing list