xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Shriram Rajagopalan <rshriram@cs.ubc.ca>
To: xen-devel@lists.xensource.com
Subject: [SPAM]  [PATCH] remus: blackhole replication target
Date: Thu, 07 Apr 2011 13:06:44 -0700	[thread overview]
Message-ID: <d7b7aef658dd962e13d2.1302206804@athos.nss.cs.ubc.ca> (raw)

# HG changeset patch
# User Shriram Rajagopalan <rshriram@cs.ubc.ca>
# Date 1302206497 25200
# Node ID d7b7aef658dd962e13d29c851a28fde89b690e2e
# Parent  a73514445065390ae70c44e1708971dd6fa2a6f0
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@cs.ubc.ca>

diff -r a73514445065 -r d7b7aef658dd tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py	Thu Apr 07 12:36:39 2011 -0700
+++ b/tools/python/xen/remus/save.py	Thu Apr 07 13:01:37 2011 -0700
@@ -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 a73514445065 -r d7b7aef658dd tools/remus/remus
--- a/tools/remus/remus	Thu Apr 07 12:36:39 2011 -0700
+++ b/tools/remus/remus	Thu Apr 07 13:01:37 2011 -0700
@@ -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'

             reply	other threads:[~2011-04-07 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 20:06 Shriram Rajagopalan [this message]
2011-04-07 20:05 ` [PATCH] remus: proper cleanup on checkpoint failure Shriram Rajagopalan
2011-04-08 15:55   ` [PATCH] remus: proper cleanup on checkpoint failure [and 1 more messages] Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7b7aef658dd962e13d2.1302206804@athos.nss.cs.ubc.ca \
    --to=rshriram@cs.ubc.ca \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).