diff options
author | Adrian Reber <areber@redhat.com> | 2021-11-05 15:18:17 +0000 |
---|---|---|
committer | Adrian Reber <areber@redhat.com> | 2021-11-05 16:15:00 +0000 |
commit | 6b8fc3bd1d851893f817f47be3a16ea117c09681 (patch) | |
tree | 2b84ab03775549e11e5cd6abad532138554f6d56 /pkg/checkpoint/checkpoint_restore.go | |
parent | 9b3b44903d4d494186bd767d2ea5f3b2c753a7f2 (diff) | |
download | podman-6b8fc3bd1d851893f817f47be3a16ea117c09681.tar.gz podman-6b8fc3bd1d851893f817f47be3a16ea117c09681.tar.bz2 podman-6b8fc3bd1d851893f817f47be3a16ea117c09681.zip |
Add 'stats-dump' file to exported checkpoint
There was the question about how long it takes to create a checkpoint.
CRIU already provides some statistics about how long it takes to create
a checkpoint and similar.
With this change the file 'stats-dump' is included in the checkpoint
archive and the tool checkpointctl can be used to display these
statistics:
./checkpointctl show -t /tmp/cp.tar --print-stats
Displaying container checkpoint data from /tmp/dump.tar
[...]
CRIU dump statistics
+---------------+-------------+--------------+---------------+---------------+---------------+
| FREEZING TIME | FROZEN TIME | MEMDUMP TIME | MEMWRITE TIME | PAGES SCANNED | PAGES WRITTEN |
+---------------+-------------+--------------+---------------+---------------+---------------+
| 105405 us | 1376964 us | 504399 us | 446571 us | 492153 | 88689 |
+---------------+-------------+--------------+---------------+---------------+---------------+
Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'pkg/checkpoint/checkpoint_restore.go')
-rw-r--r-- | pkg/checkpoint/checkpoint_restore.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/checkpoint/checkpoint_restore.go b/pkg/checkpoint/checkpoint_restore.go index f53e31f9b..46b47db98 100644 --- a/pkg/checkpoint/checkpoint_restore.go +++ b/pkg/checkpoint/checkpoint_restore.go @@ -6,6 +6,7 @@ import ( "os" metadata "github.com/checkpoint-restore/checkpointctl/lib" + "github.com/checkpoint-restore/go-criu/v5/stats" "github.com/containers/common/libimage" "github.com/containers/common/pkg/config" "github.com/containers/podman/v3/libpod" @@ -39,6 +40,7 @@ func CRImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, restoreOpt "volumes", "ctr.log", "artifacts", + stats.StatsDump, metadata.RootFsDiffTar, metadata.DeletedFilesFile, metadata.NetworkStatusFile, |