From owner-freebsd-stable@FreeBSD.ORG Tue Nov 16 16:31:33 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA8BA1065672; Tue, 16 Nov 2010 16:31:33 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 46D2E8FC08; Tue, 16 Nov 2010 16:31:33 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3A17E.dip.t-dialin.net [87.179.161.126]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 36C0C84400E; Tue, 16 Nov 2010 17:31:30 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id DCD7E2A03; Tue, 16 Nov 2010 17:31:26 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id oAGGVBdg027249; Tue, 16 Nov 2010 17:31:11 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Tue, 16 Nov 2010 17:31:11 +0100 Message-ID: <20101116173111.10651nkzyneuy4m8@webmail.leidinger.net> Date: Tue, 16 Nov 2010 17:31:11 +0100 From: Alexander Leidinger To: Christer Solskogen References: <20101116003029.GC79816@numachi.com> <20101116135557.66601irt6kd1gndw@webmail.leidinger.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 36C0C84400E.A5066 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.951, required 6, autolearn=disabled, J_CHICKENPOX_41 0.60, RDNS_NONE 1.27, TW_ZF 0.08) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1290529890.66096@IXad66a1QQ99rtnsxLLqjA X-EBL-Spam-Status: No Cc: freebsd-stable@freebsd.org, Ivan Voras Subject: Re: "High" cpu usage when using ZFS cache device 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, 16 Nov 2010 16:31:33 -0000 Quoting Christer Solskogen (from Tue, =20 16 Nov 2010 14:00:48 +0100): > On Tue, Nov 16, 2010 at 1:55 PM, Alexander Leidinger > wrote: >> How do you measure that nothing is read or written to it? >> > > I used zpool iostat -v "zpool iostat" (without -v) does not show cache filling writes to the =20 cache device. I do not know about -v, but I would not be surprised if =20 it does not show this too. >> Please check with >> =C2=A0gstat -f '^$' >> if there are really no reads/writes to the device (please replace >> with the name of your USB device, e.g. da0). >> >> If you see writes, I would say >> =C2=A0- this is the reason for the load >> =C2=A0- your cache is on the way to be filled with >> =C2=A0 useful data >> > > I see almost no writes (nor reads) I'm not sure: you verified the output of "zpool iostat -v" with gstat =20 or not? If not, please do. >> If gstat shows zero activity, I suggest to run 'top -S' and look at the >> process(es) which consume about 10% CPU (do not take care about the idle >> process). Based upon this we can maybe suggest further things to >> investigate. >> > > Heres the output of that: > CPU: 0.0% user, 0.0% nice, 11.8% system, 0.0% interrupt, 88.1% idle > Mem: 841M Active, 193M Inact, 5086M Wired, 4876K Cache, 1237M Buf, 5750M = Free > Swap: 8192M Total, 8192M Free > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMM= AND > 11 root 8 171 ki31 0K 128K CPU0 0 ??? 713.62% idl= e > 5 root 5 -8 - 0K 76K zvol:i 5 401.9H 91.16% zfsk= ern > > Thanks for your time on looking into this :-) Based upon you other answer (with -H), I would still think the L2arc =20 (cache) device is being filled in the background (which means there =20 should be something visible with gstat). Bye, Alexander. --=20 Sorry never means having you're say to love. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137