From owner-freebsd-fs@FreeBSD.ORG Fri Mar 20 15:21:46 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA56AA4A for ; Fri, 20 Mar 2015 15:21:46 +0000 (UTC) Received: from mail-ob0-f178.google.com (na3sys010aog102.obsmtp.com [74.125.245.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 439D9B9B for ; Fri, 20 Mar 2015 15:21:45 +0000 (UTC) Received: from mail-ob0-f178.google.com ([209.85.214.178]) (using TLSv1) by na3sys010aob102.postini.com ([74.125.244.12]) with SMTP ID DSNKVQw7A0r/GYWzu7CHP2vW0Ztsd9HQWgO+@postini.com; Fri, 20 Mar 2015 08:21:46 PDT Received: by obbgg8 with SMTP id gg8so80251182obb.1 for ; Fri, 20 Mar 2015 08:21:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=groupon.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=+hr7WgjSIaDcLZHDcgZ+yj7WZRMa2eLApEJ1yjlhdo0=; b=TFu/lamZDprtnBtmRuCYRV2M83u/ZM2WlV9mZN2AIx005InmtEnmK3Q6g2ja+7CW6U F6sY/TrlT5xcUEXmCxj4D2vtrpP1dSdRL/8z3rP2Lau6VUn1RZumJzZdQ0ORKScRgZab pTewWE9toOFGXU57vD+8oE5Mm7KA93kIlZu1A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=+hr7WgjSIaDcLZHDcgZ+yj7WZRMa2eLApEJ1yjlhdo0=; b=H3H+AXBuRIxBdJRixCs+24PynODy3sF3/eNCpl67D/mXdt4ZuF+5k5ptiDjOSjGdmf KTavuR+nbu9HnXdbQujO5REZf5OaFIcQ9LRGmkMdtjVbHAyIivumBVCehhq/J7Ayfgza Y1l74SShAxA2aFChlUvcg+qL/xqHO4UIWzYu0to/iFrZQe8iT1bFBs8rgaP36KtSLpXn fDXmrnz/t0hiE7Q/GjoCQptoEq0gwMHVw3KjvQnDyaW8n8ucS3xfPetU0RgZJ1rHo/d6 m+BzpQHZC78wqOvU3RQOt/ra+ZyUIuV24CAdAYQJUJHgoeg/RjD6LcyuY8irVYILDqHs vKPQ== X-Gm-Message-State: ALoCoQnJN/GfOdpp8tIgN56rhkec4AY3LuLcXzXcUbPA7l0jwU6UGwTChjdJAffkQT9b9oUO2djhyQ6mLpl5skf0pDYwxLz9z2QTFH1HMnstgAgjORwS60bnBcGtztvdKbwClCRhs/THlQSpdKd5jcla35OLCuRzTQ== X-Received: by 10.60.116.4 with SMTP id js4mr66109872oeb.78.1426864899287; Fri, 20 Mar 2015 08:21:39 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.116.4 with SMTP id js4mr66109854oeb.78.1426864899043; Fri, 20 Mar 2015 08:21:39 -0700 (PDT) Received: by 10.202.171.143 with HTTP; Fri, 20 Mar 2015 08:21:38 -0700 (PDT) In-Reply-To: References: <55076B84.0@multiplay.co.uk> Date: Fri, 20 Mar 2015 08:21:38 -0700 Message-ID: Subject: Re: ZFS doing background writes? From: Sean Chittenden To: Ronald Klop Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2015 15:21:46 -0000 Is atime set on any of your zfs file systems? Grab dtrace, write a probe to see what's doing the writes. Here's a quick script that you can run via `dtrace -s vfs-io.d`. Not the greatest, but useful. -sc #!/usr/sbin/dtrace -s #pragma D option quiet #pragma D option bufsize=8m #pragma D option switchrate=10hz #pragma D option dynvarsize=16m /* See /usr/src/sys/kern/uipc_mqueue.c for vop_read_args. * Also see sys/uio.h. */ vfs::vop_read:entry, vfs::vop_write:entry { self->ts[stackdepth] = timestamp; this->size = args[1]->a_uio->uio_resid; this->name = probefunc == "vop_read" ? "Read" : "Write"; @iosize1[execname, this->name] = quantize(this->size); } vfs::vop_read:return, vfs::vop_write:entry /this->ts = self->ts[stackdepth]/ { this->name = probefunc == "vop_read" ? "Read" : "Write"; @lat1[execname, this->name] = quantize(timestamp - this->ts); self->ts[stackdepth] = 0; } tick-1s { printf("Latencies (ns)\n\n"); printa("%s %s\n%@d\n", @lat1); printf("IO sizes (bytes)\n\n"); printa("%s %s\n%@d\n", @iosize1); printf("--------------------------------------------\n\n"); trunc(@lat1); trunc(@iosize1); } On Fri, Mar 20, 2015 at 7:53 AM, Ronald Klop wrote: > On Tue, 17 Mar 2015 07:30:24 +0100, Dirk E wrote: > > On Mon, 16 Mar 2015, Steven Hartland wrote: >>> >>> yes exactly that its defined by vfs.zfs.txg.timeout. >>>> >>> >>> Well, but what data (modulo atimes, which I presume OP had turned off >>> before) >>> are written? >>> >> >> I indeed have atime=off for the whole pool. But even with atime enabled, >> this behaviour should not happen, since no files are being accessed. Surely >> not in single user mode; the only processes outside of the kernel were >> '/bin/sh' and 'top'. Or zpool iostat when i ran it. >> >> I left the machine on and after a bunch of hours it is still doing >> periodical writes. The total ARC usage remains small: 5300K and changes >> slightly over time - again with no host writes. >> >> Even unmounting all ZFS filesystems will NOT cause this behaviour to go >> away. It seems to originate from the ZFS kernel itself, doing some >> autonomous maintenance on the background, or other feature.' >> >> Using top to sort processes with the longest CPU TIME, i can see: >> >> idle: 27.9H >> kernel: 6:48 >> intr: 4:34 >> zfskern: 0:33 >> geom: 0:29 >> syncer: 0:16 >> rand_harv 0:11 >> cam: 0:09 >> pf purge: 0:08 >> powerd: 0:03 >> >> This machine has done very little than boot and import the pool. As can >> be seen, the kernel and ZFS are pretty active in terms of CPU power. >> >> Anyone have a clue? >> > > It sounds like I have the same problem. I did not get much reply on my > question: > https://lists.freebsd.org/pipermail/freebsd-fs/2014-September/020004.html > > Regards, > Ronald. > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > -- Sean Chittenden