WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] remus: blackhole replication target

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] remus: blackhole replication target
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 09 Apr 2011 09:20:30 +0100
Delivery-date: Sat, 09 Apr 2011 01:28:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1302277765 -3600
# Node ID 29d81623dc149ac4bd942e639d9c5bd651cbc356
# Parent  13ec53a59a42d8a74a95e9439096d68e81ac2f32
remus: blackhole replication target

The new --null option allows one to test and play with just the
memory checkpointing and network buffering aspect of remus, without
the need for a second host. The disk is not replicated. All replication
data is sent to /dev/null. This option is pretty handy when a user
wants to see the page churn for his workload or observe the latency hit
though the latter will not be accurate.

Signed-off-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 13ec53a59a42 -r 29d81623dc14 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Fri Apr 08 16:49:04 2011 +0100
+++ b/tools/python/xen/remus/save.py    Fri Apr 08 16:49:25 2011 +0100
@@ -95,6 +95,12 @@
         self.sock = sock
         super(MigrationSocket, self).__init__(fd)
 
+class NullSocket(_proxy):
+    def __init__(self, address):
+        filedesc = os.open('/dev/null', 0666)
+        fd = os.fdopen(filedesc, 'w+')
+        super(NullSocket, self).__init__(fd)
+
 class Keepalive(object):
     "Call a keepalive method at intervals"
     def __init__(self, method, interval=0.1):
diff -r 13ec53a59a42 -r 29d81623dc14 tools/remus/remus
--- a/tools/remus/remus Fri Apr 08 16:49:04 2011 +0100
+++ b/tools/remus/remus Fri Apr 08 16:49:25 2011 +0100
@@ -21,6 +21,7 @@
         self.domid = 0
 
         self.host = 'localhost'
+        self.nullremus = False
         self.port = XendOptions.instance().get_xend_relocation_port()
         self.interval = 200
         self.netbuffer = True
@@ -33,6 +34,8 @@
                           help='checkpoint every MS milliseconds')
         parser.add_option('-p', '--port', dest='port', type='int',
                           help='send stream to port PORT', metavar='PORT')
+        parser.add_option('', '--blackhole', dest='nullremus', 
action='store_true',
+                          help='replicate to /dev/null (no disk checkpoints, 
only memory & net buffering)')
         parser.add_option('', '--no-net', dest='nonet', action='store_true',
                           help='run without net buffering (benchmark option)')
         parser.add_option('', '--timer', dest='timer', action='store_true',
@@ -49,6 +52,8 @@
             self.interval = opts.interval
         if opts.port:
             self.port = opts.port
+        if opts.nullremus:
+            self.nullremus = True
         if opts.nonet:
             self.netbuffer = False
         if opts.timer:
@@ -107,18 +112,22 @@
     bufs = []
 
     # disks must commit before network can be released
-    for disk in dom.disks:
-        try:
-            bufs.append(ReplicatedDisk(disk))
-        except ReplicatedDiskException, e:
-            print e
-            continue
+    if not cfg.nullremus:
+        for disk in dom.disks:
+            try:
+                bufs.append(ReplicatedDisk(disk))
+            except ReplicatedDiskException, e:
+                print e
+                continue
 
     if cfg.netbuffer:
         for vif in dom.vifs:
             bufs.append(BufferedNIC(vif))
 
-    fd = save.MigrationSocket((cfg.host, cfg.port))
+    if cfg.nullremus:
+        fd = save.NullSocket((cfg.host, cfg.port))
+    else:
+        fd = save.MigrationSocket((cfg.host, cfg.port))
 
     def postsuspend():
         'Begin external checkpointing after domain has paused'

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] remus: blackhole replication target, Xen patchbot-unstable <=