Explain rsync parameter --blocking-io

I have problems understanding the -blocking-io option in rsync. Here's the descriptor from the man page:

โ€œThis tells rsync to use blocking I / O when starting a remote shell transport. If the remote shell is either rsh or remsh, rsync is used by default to use blocking I / O, otherwise it defaults to non-blocking I / O. (Note that ssh prefers non-blocking I / O.) "

  • When using rsync as a transport, i.e. you don't use -e, is that an effect at all?

  • I assume that the result of running rsync with or without this option is the same, and the difference is in how โ€œrsyncโ€ does the transfer?

  • What is the main reason I would like to use this option? Representation? It seems rsync provides a reasonable default for me, so why should I want to use it at all?

  • And finally: what does โ€œNote that ssh prefers non-blocking I / Oโ€ means?

+4
source share
2 answers

Sorry, part of my research is confused. It's my fault. (Corrected or added material is shown in italics)

Q1: Yes. Rsync uses asynchronous I / O (non-blocking). Using this parameter, you force it to use I / O lock mode. This will be used when the remote shell (rsh) cannot handle non-blocking mode.

Q2: Yes. The end result will be the same.

Q3: would you like to use this option if the remote shell is not capable of handling non-blocking i / o

Q4: "Non-blocking mode ensures that when your connection dies, your screen session will not be blocked (" freeze ")." ( http://webcache.googleusercontent.com/search?q=cache:xmCnC0y5QU0J:www.warp13.co.uk/irssissh+ssh+blocking+mode&cd=13&hl=en&ct=clnk&gl=us&client=firefox-a) SSH just prefers to

I hope this helps!

+5
source

I am doing this thread, but ... I have found one use for --blocking-io. If you are on a channel with a relatively low bit rate in the upstream direction, rsync (compared to ssh) seems to be ideal for demonstrating buffer bloat. This will create a large send Q command in netstat and enable the upstream, causing multi-second pings to do the rest. Well, it seems that --blocking-io does prevent this, but at the same time provides decent bandwidth for a connection of several Mbps. I suspect that when connecting some products with high bandwidth with a delay, such as a 100 Mbps Internet connection or gigabit, this option can lead to a significant slowdown, but I do not have one to try it on 8-)

0
source

All Articles