From owner-freebsd-current@FreeBSD.ORG Wed Jul 14 07:16:14 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 211851065686 for ; Wed, 14 Jul 2010 07:16:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (core.vx.sk [188.40.32.143]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3DA8FC1F for ; Wed, 14 Jul 2010 07:16:13 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 3CA6C100E14; Wed, 14 Jul 2010 09:16:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bozMtF63z+Qs; Wed, 14 Jul 2010 09:16:09 +0200 (CEST) Received: from [10.9.8.1] (188-167-78-139.dynamic.chello.sk [188.167.78.139]) by mail.vx.sk (Postfix) with ESMTPSA id 58B37100E0D; Wed, 14 Jul 2010 09:16:09 +0200 (CEST) Message-ID: <4C3D6439.3010702@FreeBSD.org> Date: Wed, 14 Jul 2010 09:16:09 +0200 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Peter Jeremy References: <4C31C71C.2010606@FreeBSD.org> <20100708200446.GA33822@server.vk2pj.dyndns.org> <4C364379.6020608@FreeBSD.org> <20100714001423.GA92530@server.vk2pj.dyndns.org> In-Reply-To: <20100714001423.GA92530@server.vk2pj.dyndns.org> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: 8bit Cc: freebsd-current@FreeBSD.org Subject: Re: [CFT] ZFS v15 patch (version 3) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 07:16:14 -0000 Without head-12636.patch you are unable to reproduce the deadlock? Dňa 14. 7. 2010 2:14, Peter Jeremy wrote / napísal(a): > On 2010-Jul-08 23:30:33 +0200, Martin Matuska wrote: >> On 8. 7. 2010 22:04, Peter Jeremy wrote / napísal(a): >>> Without patching arc_memory_throttle(), a system behaves especially >>> poorly if it uses ZFS with any of mmap(2), UFS or NFS client - in my >>> case, ports/mail/mairix was almost guaranteed to wedge the system. >>> This is the problem that the following hack is intended to work around: >>> perl -e '$x = "x" x 1000000;' >>> >>> >> Regarding ARC, you might want to try the revision 209227 from head that >> is scheduled for MFC on 18.7.2010: >> http://people.freebsd.org/~mm/patches/zfs/head-12636.patch > I have done some testing with 8-STABLE with head-12636.patch and have > managed to successfully reproduce a deadlock. The system is amd64 > with 2GB RAM running a mixed UFS+ZFS environment. On a freshly booted > system, I unmount/remount my ZFS /home and a UFS scratch filesystem > that contains a 1.5GB file [ensuring there is no cached data from > either FS]. I then dd(1) the 1.5GB UFS file to /dev/null and, once > that is finished, start mairix on my ~6GB mail directory (on ZFS > /home). After some time, I get the following 'systat -v' output: > > 4 users Load 9.30 8.97 8.33 Jul 14 09:49 > > Mem:KB REAL VIRTUAL VN PAGER SWAP PAGER > Tot Share Tot Share Free in out in out > Act 122308 4436 721892 7876 59824 count > All 418376 7020 1074594k 38920 pages > Proc: Interrupts > r p d s w Csw Trp Sys Int Sof Flt cow 4031 total > 4 76 133k 3 194 30 135 zfod ata0 irq14 > ozfod 30 bge0 irq16 > 99.8%Sys 0.2%Intr 0.0%User 0.0%Nice 0.0%Idle %ozfod atapci1 20 > | | | | | | | | | | | daefr uhci0 ehci > ================================================== prcfr uhci1 22 > dtbuf totfr 2000 cpu0: time > Namei Name-cache Dir-cache 100000 desvn react 2001 cpu1: time > Calls hits % hits % 918 numvn pdwak > 273 frevn pdpgs > intrn > Disks ad0 ad1 540404 wire > KB/t 0.00 0.00 297512 act > tps 0 0 1122808 inact > MB/s 0.00 0.00 57876 cache > %busy 0 0 1948 free > 218192 buf > > Apart from normal daemons, the only processes running are vmstat, > systat and mairix (via SSH sessions). Note that the system is running > at virtually 100%sys with extremely low free memory and extremely high > context switches but no obviously useful activity. At this stage, the > system is basically unusable (I can't even kill the mairix process). > > My understanding of the problem is that the VM system sees "available" > RAM as the sum of "cache" and "free" - which is reasonably high so > there is no pressure to free up "inact" RAM. OTOH, ZFS ARC only > counts "free" RAM - which is critically low so it throttles itself > but has no way to get the VM system to move RAM onto the "free" list. >