Date: Wed, 22 Mar 2006 00:48:56 +0100 From: "Patrick M. Hausen" <hausen@punkt.de> To: Mikhail Teterin <mi+mx@aldan.algebra.com> Cc: alc@freebsd.org, stable@freebsd.org Subject: Re: more weird bugs with mmap-ing via NFS Message-ID: <20060321234856.GA24194@hugo10.ka.punkt.de> In-Reply-To: <200603211831.54172.mi%2Bmx@aldan.algebra.com> References: <200603211607.30372.mi%2Bmx@aldan.algebra.com> <200603211747.36251.mi%2Bmx@aldan.algebra.com> <200603212256.k2LMuHT0006842@apollo.backplane.com> <200603211831.54172.mi%2Bmx@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! On Tue, Mar 21, 2006 at 06:26:45PM -0500, Mikhail Teterin wrote: > The problem is about same with 32K and 16K packets. With 8K packets, the thing > kind-of works (although trying to `systat -vm' still stalls disk access), but > the outgoing traffic is over 20Mb/s on average -- MUCH more, than the writing > program itself generates. Are you using TCP or UDP for your NFS mounts? In the latter case, there is a scenario that makes a "doesn't work optimally" situation become a "doesn't work at all" situation. RPC over UDP either completes or doesn't. With 8k packets every write of a sufficiently large block (>= 8k) will generate 6 IP fragents that are sent back-to-back as fast as the sender can. If the receipient cannot cope with these frames fast enough and a single frame is lost, then the entire UDP packet is dropped. This triggers a timeout on the sending side, eventually. Which causes retransmission of the entire UDP packet, i.e. the same 6 IP fragments - with the same result: they are not received entirely -> the packet is dropped again. This used to be the case 10 years ago with may PC based NFS clients and network cards that weren't able to receive 6 packets sent back-to-back. Solution: set the read and write buffer size sufficiently low, as low as 1k in many situations. The first NE2000 network cards and clones were famous for this problem. Now imagine a client that experiences this problem only sometimes. Modern hardware, but for some reason (network congestion?) some frames are still lost if sent back-to-back. (Realtek chipset on the receiving side?) Of course, if you are using TCP, my entire mail doesn't apply ;-) HTH, Patrick -- punkt.de GmbH Internet - Dienstleistungen - Beratung Vorholzstr. 25 Tel. 0721 9109 -0 Fax: -100 76137 Karlsruhe http://punkt.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060321234856.GA24194>