Subject: Re: NIC to disk issues
To: Andrey Petrov <petrov@netbsd.org>
From: Arto Huusko <arto.huusko@utu.fi>
List: tech-net
Date: 06/11/2004 08:31:06
On Thu, 10 Jun 2004, Andrey Petrov wrote:

> > The second program connects to a TCP port, reads all the data from the
> > socket and writes the data to a file. This is done by reading a buffer
> > from the socket and then writing the buffer to the file.
>
> I assume it also has buffer size configurable.

Yes.

> > In that case, the 10mb buffer the transfer is fast, because it first fills
> > the memory, then dumps the stuff to disk, and then there's nothing more to
> > do.
> > With small buffer there is a problem, because the read from network must
> > always wait for the buffer to be flushed to disk?
>
> I suspect that disk traffic worsen nic interrupt latencies and causes
> packet loss (say not large enought memory buffer on nic) which causes
> timeouts and retransmissions. You should be able to see it in tcpdump.

I'll check what tcpdump shows later today.

However, if you are correct, where exactly is my problem. It is clear
that something is wrong on my i386 machine. If it's not NetBSD, there
must be something wrong with the hardware. I'm thinking that the
only thing it can be is the motherboard, because I've already tried
changing all the other components (NIC, disks, IDE interface).