From owner-freebsd-stable@FreeBSD.ORG Tue Nov 16 12:15: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 6F38D106566C for ; Tue, 16 Nov 2010 12:15:33 +0000 (UTC) (envelope-from christer.solskogen@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 0F9668FC1C for ; Tue, 16 Nov 2010 12:15:32 +0000 (UTC) Received: by qyk32 with SMTP id 32so968164qyk.13 for ; Tue, 16 Nov 2010 04:15: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; bh=+BF+TC4NWzELYC8ZUY0A1SRrx44Ouss7f2xxbEgiV8w=; b=FR0SVvCOZ+PMxpICJ7A75pL+hBide6Eq1y3tp1oYTMCj8vwNWxUvG4L+wrjQQJUA50 8PVtqoI/BQ2QtZyyYSwEOd0oIJmdL5MWRlZpssCjXqnrDWkZxsed+UmsZdbOp9auf+r1 Vo+A6mV5dsEg0ON2A+nmAgAR0CqxrJVdxQdRg= 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; b=Tv0wHLGXGyILoaPL3i0RBqE1X0ljWkTbVAbr/FzM92cbnWGyKRgOOJs5+TWVMIfSp1 2wefd/9KOHu2zkBjwToq7SGlFYrGW5jZcdbcn+kOTyP8JcQhzUwe8+Uuh9hqLMzugjxp ubjmud/5KgnN4L+IFTS5PIIRdZsXN7ZmplFxI= MIME-Version: 1.0 Received: by 10.229.89.202 with SMTP id f10mr6267777qcm.212.1289909732554; Tue, 16 Nov 2010 04:15:32 -0800 (PST) Received: by 10.229.231.81 with HTTP; Tue, 16 Nov 2010 04:15:32 -0800 (PST) In-Reply-To: References: <20101116003029.GC79816@numachi.com> Date: Tue, 16 Nov 2010 13:15:32 +0100 Message-ID: From: Christer Solskogen To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org 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 12:15:33 -0000 On Tue, Nov 16, 2010 at 12:47 PM, Ivan Voras wrote: > You can easily test it - use the stick as a simple disk device with UFS and > see how much CPU does it take simply to talk to the device. See, that is why I think it is a ZFS issue. Because I did that. I created a UFS filesystem on the same usb stick. Mounted it and did a "dd if=/dev/zero of=/mnt/file". The systemload goes +0.6 instead if +10.3. See: CPU: 0.0% user, 0.0% nice, 0.6% system, 0.0% interrupt, 99.3% idle Mem: 832M Active, 960M Inact, 7017M Wired, 2600K Cache, 1237M Buf, 3063M Free Swap: 8192M Total, 8192M Free PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 38261 root 1 46 0 5776K 1112K wdrain 7 0:07 4.98% dd But when using it as cache device for zfs: CPU: 0.0% user, 0.0% nice, 11.9% system, 0.0% interrupt, 88.1% idle Mem: 832M Active, 193M Inact, 5782M Wired, 2592K Cache, 1237M Buf, 5066M Free Swap: 8192M Total, 8192M Free The funny thing is that when I add the device (and some cache is added to it) the load is normal. But the load goes up when nothing is written to it (or beeing read from it) -- chs,