diff options
author | Shriram Rajagopalan <rshriram@cs.ubc.ca> | 2011-04-08 16:49:25 +0100 |
---|---|---|
committer | Shriram Rajagopalan <rshriram@cs.ubc.ca> | 2011-04-08 16:49:25 +0100 |
commit | 5bb2e121f00edec606c077b15c3bb721cc47bc41 (patch) | |
tree | 8c81a40a307d205ebeb1b7617a5963ee03bb6884 /tools/remus | |
parent | d732509e34bc6278ec2d050808f8de15e5872c4d (diff) | |
download | xen-5bb2e121f00edec606c077b15c3bb721cc47bc41.tar.gz xen-5bb2e121f00edec606c077b15c3bb721cc47bc41.tar.bz2 xen-5bb2e121f00edec606c077b15c3bb721cc47bc41.zip |
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>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/remus')
-rw-r--r-- | tools/remus/remus | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tools/remus/remus b/tools/remus/remus index 11d83e418f..93a7eb8415 100644 --- a/tools/remus/remus +++ b/tools/remus/remus @@ -21,6 +21,7 @@ class Cfg(object): 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 @@ class Cfg(object): 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 @@ class Cfg(object): 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 @@ def run(cfg): 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' |