Tip: Making remote replications faster

Status
Not open for further replies.

SRA

Dabbler
Joined
Jun 16, 2017
Messages
11
There have been complaints about Remote Replication being too slow.
I faced the same and tried replication manually which was a lot faster and a bit more research landed me to

https://bugs.freenas.org/issues/24405

After reading I just replaced

Code:
replcmd = '%s%s/bin/dd obs=1m 2> /dev/null | /bin/dd obs=1m 2> /dev/null | /usr/local/bin/pipewatcher $$ | %s "%s/sbin/zfs receive -F -d \'%s\' && echo Succeeded"' % (compress, throttle, sshcmd, decompress, remotefs)


with

Code:
replcmd = '%s%s/usr/local/bin/pipewatcher $$ | %s "%s/sbin/zfs receive -F -d \'%s\' && echo Succeeded"' % (compress, throttle, sshcmd, decompress, remotefs)


in file /usr/local/www/freenasUI/tools/autorepl.py and now the transfer is at least 4 times faster.

If we could get netcat working on FreeNAS, it will be much much faster.

Hope it helps anyone
 
Last edited by a moderator:

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
As per the bug ticket, pipewatcher buffers the connection. This just removes the buffering. Buffering should allow it to continue if there is a network disconnection.
 
Status
Not open for further replies.
Top