From owner-freebsd-stable@freebsd.org Thu Oct 20 22:48:10 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A79F3C1BA18 for ; Thu, 20 Oct 2016 22:48:10 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D515FEA for ; Thu, 20 Oct 2016 22:48:09 +0000 (UTC) (envelope-from jonc@chen.org.nz) Received: by mail-it0-x233.google.com with SMTP id 66so117915801itl.1 for ; Thu, 20 Oct 2016 15:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chen-org-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SFSE3J2E1u/qEsMWKnuQVHv6xmexM6zYMUqcB645cz8=; b=lbKQll4zMh/0B6VYSLEqLHFzC2qA4JP1qYfQGEzd6bgXdF8GYA1C8XUZM3B7wPFl2G IU+N/kD6sZHcll01dKo5eH/DWj3Og9LZHmDB7WPsCl6rgLXgMRvaX4kecm4BErpwCa+g Tm64eBRrefzXcpO5Z5b+JbHUIOTtzFKEI/OD5w+AHz61FYM7Rb0NtwCILpUyhnoj/DsU V1x+VlY2onN3iFyYOnNGbqffY/dl+i4PcKwRm2fQzs/nu2cO0eAPryWUfJwOMTCDMGX9 0wbYd29vRRcRuM6f1FWQbKVGBS03LAUZni9TviFErkZGXwr6le1cimQkXmbX/N+RSOs1 wyHA== 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:from:date :message-id:subject:to:cc; bh=SFSE3J2E1u/qEsMWKnuQVHv6xmexM6zYMUqcB645cz8=; b=Rq+ojVK4jY2+PGquzxtN0vVC4ZUhIwirF7UNhVG8hlLxlafHWiX4gVQtPon8lFQ0jA 1ZXa62ebACGdYX59QHO3fSeHwobE0xCFrqwzrZfnAfhaC950i741vBcS9ai0rCWG16Qr bH52h+MlMsPIIx5mZ1Fg+PFWbnYGy+2tGaQqLm5DXj8vDQQdqmYdUGd1mjdnC+rb03Fb 15R78LKVzrfRE93GQcshEv4M8W4m5IrA3OGazr9lstQa6M4AgGncqhpeEVVPqiOoEeMD E9IhCUQq8CyO+MA9yNEjguu4yrJYT+JAZyyGg2om4dQd8blHHRqS6XNCet2F2xqI+gZQ +0PA== X-Gm-Message-State: ABUngvdHQNDJmgA404L9xLKGuiZmym7KW1ZvDFOMcgyWQa6wYf8AsK5KlD/De6PdvkQiabDue64nwuuDP13WEw== X-Received: by 10.107.34.199 with SMTP id i190mr3386513ioi.90.1477003688545; Thu, 20 Oct 2016 15:48:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.38.87 with HTTP; Thu, 20 Oct 2016 15:48:07 -0700 (PDT) X-Originating-IP: [203.99.129.1] In-Reply-To: <92607b3b-a2d1-2391-5bd6-9781f426d7a6@multiplay.co.uk> References: <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> <92607b3b-a2d1-2391-5bd6-9781f426d7a6@multiplay.co.uk> From: Jonathan Chen Date: Fri, 21 Oct 2016 11:48:07 +1300 Message-ID: Subject: Re: zfs, a directory that used to hold lot of files and listing pause To: Steven Hartland Cc: freebsd-stable@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2016 22:48:10 -0000 On 21 October 2016 at 11:27, Steven Hartland wrote: > On 20/10/2016 22:18, Jonathan Chen wrote: >> >> On 21 October 2016 at 09:09, Peter wrote: >> [...] >>> >>> I see this on my pgsql_tmp dirs (where Postgres stores intermediate >>> query data that gets too big for mem - usually lots of files) - in >>> normal operation these dirs are completely empty, but make heavy disk >>> activity (even writing!) when doing ls. >>> Seems normal, I dont care as long as the thing is stable. One would need >>> to check how ZFS stores directories and what kind of fragmentation can >>> happen there. Or wait for some future feature that would do >>> housekeeping. ;) >> >> I'm seeing this as well with an Odoo ERP running on Postgresql. This >> lag does matter to me as this is huge performance hit when running >> Postgresql on ZFS, and it would be good to see this resolved. >> pg_restores can make the system crawl as well. > > As mentioned before could you confirm you have disable atime? Yup, also set the blocksize to 4K. 11:46am# zfs get all irontree/postgresql NAME PROPERTY VALUE SOURCE irontree/postgresql type filesystem - irontree/postgresql creation Wed Sep 23 15:07 2015 - irontree/postgresql used 43.8G - irontree/postgresql available 592G - irontree/postgresql referenced 43.8G - irontree/postgresql compressratio 1.00x - irontree/postgresql mounted yes - irontree/postgresql quota none default irontree/postgresql reservation none default irontree/postgresql recordsize 8K local irontree/postgresql mountpoint /postgresql inherited from irontree irontree/postgresql sharenfs off default irontree/postgresql checksum on default irontree/postgresql compression off default irontree/postgresql atime off local irontree/postgresql devices on default irontree/postgresql exec on default irontree/postgresql setuid on default irontree/postgresql readonly off default irontree/postgresql jailed off default irontree/postgresql snapdir hidden default irontree/postgresql aclmode discard default irontree/postgresql aclinherit restricted default irontree/postgresql canmount on default irontree/postgresql xattr off temporary irontree/postgresql copies 1 default irontree/postgresql version 5 - irontree/postgresql utf8only off - irontree/postgresql normalization none - irontree/postgresql casesensitivity sensitive - irontree/postgresql vscan off default irontree/postgresql nbmand off default irontree/postgresql sharesmb off default irontree/postgresql refquota none default irontree/postgresql refreservation none default irontree/postgresql primarycache all default irontree/postgresql secondarycache all default irontree/postgresql usedbysnapshots 0 - irontree/postgresql usedbydataset 43.8G - irontree/postgresql usedbychildren 0 - irontree/postgresql usedbyrefreservation 0 - irontree/postgresql logbias latency default irontree/postgresql dedup off default irontree/postgresql mlslabel - irontree/postgresql sync standard default irontree/postgresql refcompressratio 1.00x - irontree/postgresql written 43.8G - irontree/postgresql logicalused 43.4G - irontree/postgresql logicalreferenced 43.4G - irontree/postgresql volmode default default irontree/postgresql filesystem_limit none default irontree/postgresql snapshot_limit none default irontree/postgresql filesystem_count none default irontree/postgresql snapshot_count none default irontree/postgresql redundant_metadata all default -- Jonathan Chen