From owner-freebsd-stable@FreeBSD.ORG Tue Nov 16 16:48: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 C05F5106566C for ; Tue, 16 Nov 2010 16:48:32 +0000 (UTC) (envelope-from christer.solskogen@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8E88FC17 for ; Tue, 16 Nov 2010 16:48:32 +0000 (UTC) Received: by pzk1 with SMTP id 1so32939pzk.13 for ; Tue, 16 Nov 2010 08:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EQjzmUrGWc0BwmlzSnNkNafAczmuj1Dskw97Tv5hEHs=; b=Q/wOHHMVs4BpwrN5Itt34SesHBqnPbi1JLvnJKsgmcElU/+h94qn73dcwEH+Ugm39e WMCiy7S+tt7owch2RO8thINuNiJhuDz7qC+X7lRYFJyXJVKpdwgaz65NqGSycQ2WqJrk ogS5ruh0O4pY2Qup5PNxmSwvOmpfogyun3XG0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=T1UBUsJMZ2cQzsf1S1068gLJaLX9w8DZ7/PBctkPGhU6FE8xMDgDkfgNpbxdjcDuTA aecD8+rZokm35FBgdhWyJKvE4fgdVSsBZ2AwVo89DMXoplxyikzefCc04LLU+WWIPlDS TRvVSr5GxsUp8SFrKFJT51SQJ/K/ilREyHhhc= MIME-Version: 1.0 Received: by 10.229.89.202 with SMTP id f10mr6489234qcm.212.1289926111112; Tue, 16 Nov 2010 08:48:31 -0800 (PST) Received: by 10.229.231.81 with HTTP; Tue, 16 Nov 2010 08:48:31 -0800 (PST) In-Reply-To: <20101116173111.10651nkzyneuy4m8@webmail.leidinger.net> References: <20101116003029.GC79816@numachi.com> <20101116135557.66601irt6kd1gndw@webmail.leidinger.net> <20101116173111.10651nkzyneuy4m8@webmail.leidinger.net> Date: Tue, 16 Nov 2010 17:48:31 +0100 Message-ID: From: Christer Solskogen To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Stable 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:48:33 -0000 On Tue, Nov 16, 2010 at 5:31 PM, Alexander Leidinger wrote: > Quoting Christer Solskogen (from Tue, 16 N= ov > 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 cac= he > device. I do not know about -v, but I would not be surprised if it does n= ot > show this too. > Ah, but it does. capacity operations bandwidth pool used avail read write read write ---------- ----- ----- ----- ----- ----- ----- data 2.11T 1.96T 0 0 0 0 raidz1 2.11T 1.96T 0 0 0 0 ada1 - - 0 0 0 0 ada2 - - 0 0 0 0 ada3 - - 0 0 0 0 cache - - - - - - da0 2.64G 4.89G 0 0 0 0 ---------- ----- ----- ----- ----- ----- ----- >>> Please check with >>> =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 >>> =A0- this is the reason for the load >>> =A0- your cache is on the way to be filled with >>> =A0 useful data >>> >> >> I see almost no writes (nor reads) > > I'm not sure: you verified the output of "zpool iostat -v" with gstat or > not? If not, please do. > Yeah, gstat shows (almost) the same as zpool iostat -v. (gstat have a higher refresh rate than iostat) > Based upon you other answer (with -H), I would still think the L2arc (cac= he) > device is being filled in the background (which means there should be > something visible with gstat). > gstat shows that something is going on when I add the cache device(about one minute in my case). But the systemload is +0.01%. But when it's settled the system load goes up. top -HS says that the command called: l2arc_feed_threa goes up when nothing is happening to the cache. (according to "zpool iostat -v" and gstat) --=20 chs,