From owner-freebsd-stable@freebsd.org Thu Oct 20 14:31:46 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 7738AC191D5 for ; Thu, 20 Oct 2016 14:31:46 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Received: from vie01a-qmta-at50-1.mx.upcmail.net (vie01a-qmta-at50-1.mx.upcmail.net [62.179.121.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30FD9847 for ; Thu, 20 Oct 2016 14:31:45 +0000 (UTC) (envelope-from dr.klepp@gmx.at) Received: from [172.31.218.21] (helo=vie01a-dmta-at52-3.mx.upcmail.net) by vie01a-pqmta-at50.mx.upcmail.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1bxEB3-0003Ay-RA for freebsd-stable@freebsd.org; Thu, 20 Oct 2016 16:18:37 +0200 Received: from [172.31.216.41] (helo=vie01a-pemc-psmtp-at50) by vie01a-dmta-at52.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1bxEAv-0006ah-8w for freebsd-stable@freebsd.org; Thu, 20 Oct 2016 16:18:29 +0200 Received: from t60.lan ([85.126.97.210]) by vie01a-pemc-psmtp-at50 with SMTP @ mailcloud.upcmail.net id xqJU1t01r4YLlkt0BqJVCL; Thu, 20 Oct 2016 16:18:29 +0200 X-SourceIP: 85.126.97.210 X-CNFS-Analysis: v=2.2 cv=FpZHxCjq c=1 sm=2 tr=0 a=/Ac8Q0O/YFE5LOLfUiYZVw==:117 a=/Ac8Q0O/YFE5LOLfUiYZVw==:17 a=8nJEP1OIZ-IA:10 a=A4C9TOB8URguu_oj8IAA:9 a=wPNLvfGTeEIA:10 From: "Dr. Nikolaus Klepp" To: freebsd-stable@freebsd.org Subject: Re: zfs, a directory that used to hold lot of files and listing pause Date: Thu, 20 Oct 2016 16:18:31 +0200 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) References: <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> In-Reply-To: <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201610201618.31186.dr.klepp@gmx.at> 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 14:31:46 -0000 Am Donnerstag, 20. Oktober 2016 schrieb Eugene M. Zheganin: > Hi. > > I have FreeBSD 10.2-STABLE r289293 (but I have observed this situation > on different releases) and a zfs. I also have one directory that used to > have a lot of (tens of thousands) files. I surely takes a lot of time to > get a listing of it. But now I have 2 files and a couple of dozens > directories in it (I sorted files into directories). Surprisingly, > there's still a lag between "ls" and an output: > > > ===Cut=== > > # /usr/bin/time -h ls > .recycle 2016-01 2016-04 2016-07 2016-10 > sort-files.sh > 2014 2016-02 2016-05 2016-08 ktrace.out > sort-months.sh > 2015 2016-03 2016-06 2016-09 old > sounds > 5.75s real 0.00s user 0.02s sys > > ===Cut=== > > > I've seen this situation before, on other servers, so it's not the first > time I encounter this. However, it's not 100% reproducible (I mean, if I > fill the directory with dozens of thousands of files, I will not > certainly get this lag after the deletion). > > Has anyone seen this and does anyone know how to resolve this ? It's not > critical issue, but it makes thing uncomfortable here. One method I'm > aware of: you can move the contents of this directory to some other > place, then delete it and create again. But it's kind of a nasty workaround. Hi! I've the same issue, but only if the ZFS resides on a LSI MegaRaid and one RAID0 for each disk. Nik -- Please do not email me anything that you are not comfortable also sharing with the NSA.