Registered users
Linkedin Twitter Facebook Google+
Close

In order to improve user's experience and to enable some functionalities by tracking the user accross the website, this website uses its own cookies and from third parties, like Google Analytics and other similar activity tracking software. Read the Privacy Policy
33HOPS, IT Consultants
33HOPS ::: Proveedores de Soluciones Informáticas :: Madrid :+34 91 663 6085Avda. Castilla la Mancha, 95 - local posterior - 28700 S.S. de los Reyes - MADRID33HOPS, Sistemas de Informacion y Redes, S.L.Info

<< Return to index

(c)XSITools: how to speed up data throughput

Alert! This approach is only possible in ESXi 5.5 and below. Since ESXi 6.0 VMWare cut down the possibility to create socket files, thus Controlmaster Multiplexing will not work in ESXi 6.0.0 and above.

(c)XSITools tunnels chunked data through SSH. Every time an SSH data transfer is performed, the SSH authentication and handshaking takes place. This takes from 0.3 to 0.7 seconds for each block transfer and can represent up to 10-25% of the time it takes to upload your data.

Fortunately, the SSH server includes a feature to allow reusing sockets for subsequent connections, it is called ControlMaster, and can be used to speed up your data throughput when using (c)XSITools in your backups.

Many of our clients, which are familiar with the SSH protocol already use this directive. Activating it is a fairly trivial task, but we have decided to write this post to shed light on this matter and encourage users which are not so familiarized with the use of the SSH protocol to activate it in their hosts.

By enabling the ControlMaster in your SSH host, you will reduce the connection establishment period to 0.01-0.02 seconds, which will make your (c)XSITools backups to be much faster.

We will probably be adding this feature to next main version of (c)XSIBackup, so if you are using version 11.3.0 or above, you will most probably not need to activate this by hand.

If you have some older version and you want to enable this feature, you just have to edit the main xsibackup file, look for the SSHOPTS variable and set that line to:



If you still feel not very confident about editing the file yourself, you may just execute this script, which will patch your xsibackup file. Please, note that this script will look for the first xsibackup file in your system and patch it, if you have multiple xsibackup files in your server, only the first will be patched.

Don't forget to backup your xsi-dir first. This script copies your xsibackup file to the /tmp dir, but you should always cover yourself from loosing data.

Cut & paste the below command to your SSH client, wait some seconds while the code is parsed and press enter, you should see a notice stating: "Patch successfully installed -- OK".

Parsing multiline scripts by cut&paste can sometimes return some syntax error, at least in Putty. If that is your case you may retry, we found that it's always parsed correctly when you insist. In our case, Putty deletes some new line characters randomly for some unknown reason.

You can always paste it into a script file and run it, which will always be a winner option. The script may take some seconds to find your xsibackup file, it will look up to 5 directories under /vmfs/volumes.




You can also check the difference on your own

Switch to your xsi-dir folder and run this command against any previously "linked" server. Replace the value of the SERVER_IP and SERVER_PO variables by your linked server's IP and port.

Note: A linked server is a host to which you have added XSIBackup's public key: xsibackup_id_rsa.pub to its authorized_keys file. This is a general SSH procedure which you may easily perform by using the built in --link-srv argument.



The controlpath option is at the same time including some variables wich refer to the remote user name (%r) the host (%h) and the port (%p). Note that the socket will be reused up to the number of times defined by the MaxSessions variable in the server configuration file (/etc/ssh/sshd_config). MaxSessions defaults to 10, so you may increase it manually to stretch the benefits of Controlmaster.

Note that we have added the time command at the beggining of the check. First time that you execute the below command, it will take around 0.5 seconds, depending on your network speed and whether you are running the check in a LAN or through a VPN, a WAN or an Internet connection.

When you run the check on subsequent runs, before the socket timeout (ControlPersist=30s) expires. You will see the command is run much faster. If you let the socket timeout expire, you will notice that the first additional run returns back to around 500 milliseconds. The same will happen when the MaxSessions variable limit is reached.

As an excerpt, adding the Controlmaster directive to the SSH Client command list options is enough for the client to create a socket that it will reuse on subsequent SSH connections. Be aware that this option is only available from OpenSSH 5.6 and above.

Daniel J. García Fidalgo
33HOPS



Website Map
Consultancy
IT Manager
In Site
Resources & help
Index of Docs
33HOPS Forum

Fill in to download
The download link will be sent to your e-mail.
Name
Lastname
E-mail


            Read our Privacy Policy