From owner-freebsd-stable@FreeBSD.ORG Tue Mar 21 23:49:01 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0165416A401; Tue, 21 Mar 2006 23:49:01 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17E5343D48; Tue, 21 Mar 2006 23:48:59 +0000 (GMT) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [10.0.0.110]) by kagate2.punkt.de with ESMTP id k2LNmwfr000580; Wed, 22 Mar 2006 00:48:58 +0100 (CET) Received: from hugo10.ka.punkt.de (localhost [127.0.0.1]) by hugo10.ka.punkt.de (8.12.10/8.12.10) with ESMTP id k2LNmvoI024355; Wed, 22 Mar 2006 00:48:57 +0100 (CET) (envelope-from ry93@hugo10.ka.punkt.de) Received: (from ry93@localhost) by hugo10.ka.punkt.de (8.12.10/8.12.10/Submit) id k2LNmvhW024354; Wed, 22 Mar 2006 00:48:57 +0100 (CET) (envelope-from ry93) Date: Wed, 22 Mar 2006 00:48:56 +0100 From: "Patrick M. Hausen" To: Mikhail Teterin Message-ID: <20060321234856.GA24194@hugo10.ka.punkt.de> References: <200603211607.30372.mi+mx@aldan.algebra.com> <200603211747.36251.mi+mx@aldan.algebra.com> <200603212256.k2LMuHT0006842@apollo.backplane.com> <200603211831.54172.mi+mx@aldan.algebra.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200603211831.54172.mi+mx@aldan.algebra.com> User-Agent: Mutt/1.5.10i Cc: alc@freebsd.org, stable@freebsd.org Subject: Re: more weird bugs with mmap-ing via NFS X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2006 23:49:01 -0000 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