forked from containers/podman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libpod: put rootfs diffs inline into snapshot tar.
This yields a 2x speed up on creating and restoring snapshots, as it avoids creating and extracting the temporary rootfs-diff.tar file. Tested with the following recipe $ cat files.sh #!/bin/sh dd if=/dev/urandom of=test bs=1M count=100 for i in $(seq 1 10); do cp test test$i & done wait rm /usr/bin/znew $ sudo ~/vc/containers/podman/podman run -dt -p 8080:80/tcp docker.io/library/httpd; \ sudo ~/vc/containers/podman/podman container cp files.sh $(sudo ~/vc/containers/podman/podman ps -l --format "{{.ID}}"):files.sh ;\ sudo ~/vc/containers/podman/podman container exec -it -l /bin/sh -x files.sh ;\ (cd ../containers/podman/ && go build -tags "selinux seccomp" ./cmd/podman) && sudo ~/vc/containers/podman/podman container checkpoint -e foo.tar -l && \ sudo ~/vc/containers/podman/podman container restore -i foo.tar --name restored For productionizing, this would need * supporting (de)compression, which I left out for simplicity * a decision on what to do with backward compatibility * similar treatment of the devshm and volumes tar files * a more principled approach to storing multiple sections in a single tar file? * upstreaming changes to the archive package in the storage repo (including tests) Addresses containers#24826
- Loading branch information
1 parent
7175dd8
commit 583d46e
Showing
2 changed files
with
111 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters