Commit a0a738cb authored by ben's avatar ben

Enabled ssh compression by default, increased conn_bufsize.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@88 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 600c2cd9
New in v0.7.5 (2002/06/01)
--------------------------
After a bit of empirical testing, increased Globals.conn_bufsize and
enabled ssh compression by default. This should speed up the
"typical" remote session.
Fixed bug noticed by Dean Gaudet in processing of
--(include|exclude)-filelist[-stdin] options when source directory was
remote.
......
......@@ -245,6 +245,12 @@ number of seconds ago. Otherwise start a new backup. The default is
Enter server mode (not to be invoked directly, but instead used by
another rdiff-backup process on a remote computer).
.TP
.B --ssh-no-compression
When running ssh, do not use the -C option to enable compression.
.B --ssh-no-compression
is ignored if you specify a new schema using
.B --remote-schema.
.TP
.BI "--terminal-verbosity " [0-9]
Select which messages will be displayed to the terminal. If missing
the level defaults to the verbosity level.
......
......@@ -247,13 +247,13 @@ class RORPath(RPathStatic):
This object doesn't contain any information about the file,
but, when passed along, may show where the previous stages are
in their processing. It is the RORPath equivalent of fiber.
This placeholder size, in conjunction with the placeholder
threshold in Highlevel .. generate_dissimilar seem to yield an
OK tradeoff between unnecessary placeholders and lots of
memory usage, but I'm not sure exactly why.
"""
self.data = {'placeholder':
("It is actually good for placeholders to use"
"up a bit of memory, so the buffers get flushed"
"more often when placeholders move through."
"See the get_dissimilar docs for more info.")}
self.data = {'placeholder': " "*500}
def isplaceholder(self):
"""True if the object is a placeholder"""
......
......@@ -20,7 +20,7 @@ class Globals:
# This is used by the BufferedRead class to determine how many
# bytes to request from the underlying file per read(). Larger
# values may save on connection overhead and latency.
conn_bufsize = 4096
conn_bufsize = 98304
# True if script is running as a server
server = None
......@@ -139,6 +139,9 @@ class Globals:
"jpg|gif|png|jp2|mp3|ogg|avi|wmv|mpeg|mpg|rm|mov)$"
no_compression_regexp = None
# Determines whether or not ssh will be run with the -C switch
ssh_compression = 1
# On the reader and writer connections, the following will be
# replaced by the source and mirror Select objects respectively.
select_source, select_mirror = None, None
......
......@@ -36,8 +36,9 @@ class Main:
"parsable-output", "quoting-char=", "remote-cmd=",
"remote-schema=", "remove-older-than=",
"restore-as-of=", "resume", "resume-window=", "server",
"terminal-verbosity=", "test-server", "verbosity",
"version", "windows-mode", "windows-time-format"])
"ssh-no-compression", "terminal-verbosity=",
"test-server", "verbosity", "version", "windows-mode",
"windows-time-format"])
except getopt.error, e:
self.commandline_error("Bad commandline options: %s" % str(e))
......@@ -100,6 +101,8 @@ class Main:
elif opt == '--resume-window':
Globals.set_integer('resume_window', arg)
elif opt == "-s" or opt == "--server": self.action = "server"
elif opt == "--ssh-no-compression":
Globals.set('ssh_compression', None)
elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg)
elif opt == "--test-server": self.action = "test-server"
elif opt == "-V" or opt == "--version":
......
......@@ -247,13 +247,13 @@ class RORPath(RPathStatic):
This object doesn't contain any information about the file,
but, when passed along, may show where the previous stages are
in their processing. It is the RORPath equivalent of fiber.
This placeholder size, in conjunction with the placeholder
threshold in Highlevel .. generate_dissimilar seem to yield an
OK tradeoff between unnecessary placeholders and lots of
memory usage, but I'm not sure exactly why.
"""
self.data = {'placeholder':
("It is actually good for placeholders to use"
"up a bit of memory, so the buffers get flushed"
"more often when placeholders move through."
"See the get_dissimilar docs for more info.")}
self.data = {'placeholder': " "*500}
def isplaceholder(self):
"""True if the object is a placeholder"""
......
......@@ -16,9 +16,10 @@ class SetConnections:
"""
# This is the schema that determines how rdiff-backup will open a
# pipe to the remote system. If the file is given as A:B, %s will
# pipe to the remote system. If the file is given as A::B, %s will
# be substituted with A in the schema.
__cmd_schema = 'ssh %s rdiff-backup --server'
__cmd_schema = 'ssh -C %s rdiff-backup --server'
__cmd_schema_no_compress = 'ssh %s rdiff-backup --server'
# This is a list of remote commands used to start the connections.
# The first is None because it is the local connection.
......@@ -27,6 +28,9 @@ class SetConnections:
def InitRPs(cls, arglist, remote_schema = None, remote_cmd = None):
"""Map the given file descriptions into rpaths and return list"""
if remote_schema: cls.__cmd_schema = remote_schema
elif not Globals.ssh_compression:
cls.__cmd_schema = cls.__cmd_schema_no_compress
if not arglist: return []
desc_pairs = map(cls.parse_file_desc, arglist)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment