Subject: Re: Why is my rmt so slow or what takes exactly 0.2 seconds?
To: Edgar =?iso-8859-1?B?RnXf?= <efnbl05@bn2.maus.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-net
Date: 08/17/2005 18:22:34
On Wed, Aug 17, 2005 at 06:13:03PM +0200, Edgar Fuß wrote:
> I'm not entirely sure my problem is net related.
> 
> The problem occurs on 2.0.2/i386 in case it matters.
> 
> I wondered why my dump via (ssh tunneled) rmt was so slow (80kB/s).
> 
> I boiled it down to having both dump and rmt run on the same machine
> (so it can't be the network -- switches or something) and outputting
> to /dev/null (so it can't be the tape device). Still only 80kB/s.
> 
> Dumping directly to /dev/nrst0 gives close to 2MB/s, so it's not the disk.
> 
> I ktraced both ends (dump/ssh and ssh/rmt) and inspected the kdumps
> with time stamps.
> 
> It looks like, from time to time, the rmt process issues a read call
> that only returns after nearly exactly 0.2 seconds for no apparent reason.
> Sometimes, this happens while reading large chunks of tape data, but sometimes
> it even happens reading a single command character of the rmt protocol.
> 
> Any ideas what keeps the rmt process scheduled away for 0.2 seconds?

It could be a tcp issue, waiting for more data before sending a packet,
while the dump/rmt protocol is waiting for a reply. Try to play with the
various tcp sysctls.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--