I have problems with understanding the –blocking-io option in rsync. Here’s the descripton from the man page:
“This tells rsync to use blocking I/O when launching a remote shell transport. If the remote shell is either rsh or remsh, rsync defaults to using blocking I/O, otherwise it defaults to using non-blocking I/O. (Note that ssh prefers non-blocking I/O.)”
-
When using rsync as the transport,
i.e. you don’t use -e, does this have
an effect at all? -
I guess the result of running rsync
with or without that option is the
same and the difference is in ‘how’
rsync does the transfer? -
What’s the main reason I would wanted
to use this option? Performance?
Looks like rsync provides sensible
defaults for me, so why would I want
to use it at all? -
And the last one: What does “Note
that ssh prefers non-blocking I/O”
mean?
Sorry part of my research got mixed up. That is my fault. (Corrected or added stuff is in italics)
Q1: Yes. Rsync uses asynchronous I/O (non-blocking). By using that option, you are forcing it to use blocking I/O mode. This would be used when the remote shell (rsh) cannot handle non-blocking mode.
Q2: Yes. The end result will be the same.
Q3: You would want to use this option if the remote shell is not capable of handling non-blocking i/o
Q4: “Non-blocking mode makes sure when your connection dies, your screen session won’t block (‘hang’).” (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 that
I hope that helps!