28

Are there any practical benefits in using rsyncd compared to rsync over ssh? Does it really increase speed, stability, anything?

19

I think the big difference is that if you're using rsyncd on the server end, instead of rsync over ssh, the server already knows what it has, so building the file lists to determine what needs to be transferred is much simpler. It won't make a difference if you're just pushing around a few files, but if you're making, for example, CPAN available over rsync, you don't want to have to build the file list on the source side every time.

  • Pardon my ignorance. on one server I have running rsyncd. on another host I use rsync to copy from remote server to this one... and it uses ssh. I cannot understand: how to force the rsync command to user the remote daemon? – Massimo May 20 at 10:17
14

This is an old question, but there is another very valid reason for using rsync in daemon mode versus over ssh:

  • Lower CPU overhead.

I have one 10 TB NAS that is backed up to another 10 TB NAS, and the encryption overhead for just the SSH tunnel is the limiting factor for the transfer. Both NASes are fairly low-powered 1.8 Ghz Intel Atoms, and even with easier crypto options for ssh (e.g. ssh -c arcfour passed as the ssh call to rsync), the encryption overhead still results in at best 200-300 Mbps, on a gigabit ethernet network.

Using a rsync daemon on one end removes the crypto overhead, and achieves >800 Mbps transfers for large, contiguous files.

  • 1
    Very helpful, thanks. I'm running a similar setup and was able to double the transfer speed I was getting from an ssh -c arcfour connection I'd been using. – SteveLambert Feb 26 '18 at 13:34
  • Not sure if removing the crypto 'overhead' can be considered an advantage.. It'd be best to use hardware accelerated crypto, which ARC4 is probably not really. – Lodewijk Oct 19 '18 at 14:40
  • @Lodewijk - First, I'm on a private network at my house, so encryption isn't critical (and it's not super private data anyways). Additionally, either the rsync version in my distribution doesn't use hardware crypto, or the intel atom I'm using doesn't have hardware accelerators. I tried most of the crypto options for the SSH transport, and all of them were pretty much horribly slow. – Fake Name Oct 20 '18 at 1:33
  • If there was a crypto option that didn't massively affect the performance, I'd use it, but I tried those options first with no luck. – Fake Name Oct 20 '18 at 1:36
  • Pardon my ignorance. on one server I have running rsyncd. on another host I use rsync to copy from remote server to this one... and it uses ssh. I cannot understand: how to force the rsync command to user the remote daemon? – Massimo May 20 at 10:17
8

I don't think comparing running rsyncd to rsync over SSH makes much sense. They are generally used for completely different things.

rsync over ssh is usually used for backups, or syncing servers over the internet. rsyncd is usually used for things like software mirrors, so it makes more sense to compare rsyncd to a plain HTTP or FTP mirror or even bittorrent.

There is also software like zsync, which allows you to get many of the benefits of rsync while still using a standard HTTP server

3

The function of rsyncd is to run on a server and respond to (remote) rsync requests.

(when we say rsyncd we mean rsync running as a daemon, and when we say 'remote', we mean remote from the point of view of the machine running rsyncd)

Both would use ssh in order to talk to each other securely.

It's not really a question of using one or the other, although if rsync is used to copy files and directories on the same machine, I don't think it needs to run as a daemon.

I think the rsync man page clarifies this.

0

rsyncd (rsyncd with daemon) uses by default port 873.

This will use the native rsync protocol, but does not encrypt anything. It is meant only for local or trusted networks.

If you want security, always you have to use rsync or rsyncd over SSH, all your data transfers will be entrypted by the ssh protocol.

  • This. Should be the accepted answer! Rsyncd is totally insecure, I can't believe no one had mentionned it. – stefgosselin May 2 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.