Bug 20674

Summary: Dreadful tar performance with remote device
Product: Base System Reporter: jms <jms>
Component: gnuAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description jms 2000-08-17 10:30:00 UTC
I initially noticed my established backup procedure was slow then found the
problem was that tar doesn't cope with remote devices very well even 
if they aren't remote. See how-to-repeat for output which shows that rsh/rcp
on its own is ok.

On a longer test the machine can be seen to be IDLE while it's taking
forever not transferring the data. This is why I think it is a bug
rather than overhead. I don't know whether it is tar or the kernel
waiting.

How-To-Repeat: Machine is a P233MMX...

Script started on Thu Aug 10 21:51:27 2000
bash-2.04# ls -l meg
-rw-r--r--  1 root  wheel  1048576 Aug 10 21:50 meg
bash-2.04# time rcp meg localhost:/tmp

real	0m0.374s
user	0m0.006s
sys	0m0.063s
bash-2.04# time tar cvf localhost:/tmp/fff.tar meg 
meg

real	0m10.511s
user	0m0.001s
sys	0m0.054s
bash-2.04# exit

Script done on Thu Aug 10 21:52:17 2000

The above is VERY sensitive to blocksize.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-17 13:17:49 UTC
State Changed
From-To: open->feedback

GNU tar is not maintained by the FreeBSD project, and has its 
own mail address for reporting bugs: <tar-bugs@gnu.org>. 

It is worth noting, however, that FreeBSD ships a fairly 
old and modified version of GNU tar.  If you could try to 
build GNU tar 1.13, and see whether the problem persists, 
that would probably give us an indication as to whether 
this actually needs to be reported to the GNU folks.
Comment 2 jms 2000-08-18 16:06:44 UTC
I've tested the packaged gnu tar 1.13 and that's about the same.

I tried switching the tcp.delayed_ack sysctl to 0 and that seems to
cure the problem. However it is still faster doing the rsh bit manually
than letting tar do it.

	Jon
Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-21 12:53:25 UTC
State Changed
From-To: feedback->closed

Thanks for the feedback.  Since this appears to be a problem 
that exists in the latest stock release of GNU tar, 
you should take it up with the GNU tar maintainers.