[lxc-devel] [lxd/master] migrate: bump ghost limit

tych0 on Github lxc-bot at linuxcontainers.org
Wed Jul 20 14:25:25 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 409 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160720/5149b3fc/attachment.bin>
-------------- next part --------------
From 5ed849c455e9eb757956c00f79802dcc28f512d7 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Tue, 19 Jul 2016 20:58:00 +0000
Subject: [PATCH] migrate: bump ghost limit

1MB is not very big, let's make that bigger.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 lxd/container_lxc.go | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lxd/container_lxc.go b/lxd/container_lxc.go
index 5d1503b..1f9a09b 100644
--- a/lxd/container_lxc.go
+++ b/lxd/container_lxc.go
@@ -2799,12 +2799,21 @@ func (c *containerLXC) Migrate(cmd uint, stateDir string, function string, stop
 			script = filepath.Join(stateDir, "action.sh")
 		}
 
+		// TODO: make this configurable? Ultimately I think we don't
+		// want to do that; what we really want to do is have "modes"
+		// of criu operation where one is "make this succeed" and the
+		// other is "make this fast". Anyway, for now, let's choose a
+		// really big size so it almost always succeeds, even if it is
+		// slow.
+		ghostLimit := uint64(256 * 1024 * 1024)
+
 		opts := lxc.MigrateOptions{
 			Stop:            stop,
 			Directory:       stateDir,
 			Verbose:         true,
 			PreservesInodes: preservesInodes,
 			ActionScript:    script,
+			GhostLimit:	 ghostLimit,
 		}
 
 		migrateErr = c.c.Migrate(cmd, opts)


More information about the lxc-devel mailing list