From owner-freebsd-stable@freebsd.org Thu Oct 20 16:17:20 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 DBD3FC1AE29 for ; Thu, 20 Oct 2016 16:17:20 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (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 9C1111A9 for ; Thu, 20 Oct 2016 16:17:20 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-qk0-x22a.google.com with SMTP id n189so103441258qke.0 for ; Thu, 20 Oct 2016 09:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=3AbUc1AM5W3NYDjH0T7UO3RYtrwROSd6SFNk8rCztlQ=; b=f/pBz9Zh6caE4rIpYeZthTqtWpnS7BqKNRo7EH1fMo7A9XVUpDVOySe3XETdax37n0 tRMZciQgt9VPFNDEYM8ie/1PivPxVI8pxBwmQ+hSEqDzLb+LOGbqEy2eKkV7+A+Irnn5 /+WdvJ14+ip+xqNQFThqGxuHBUjlE21mk4Fr3l+lfGUcm5wIMGk7SQ0J8asfXTsPytGU iDPg+8x8fMFkjWV+B5phIe6zA34eVhGxne0lrYDwi546zZDYtvVC9YyM3FBc4JlmfrHE DedTL0kHf3mnnlBz6X5j/513psHCPReakbcDxOenI5/6FmHn+JfSUP5iIKwoRlIZm/8i 15aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=3AbUc1AM5W3NYDjH0T7UO3RYtrwROSd6SFNk8rCztlQ=; b=V9lMBVhjpQTI9wYQhkYe8gQwBtXMAha0lu83s/FjlOwQuBNQC3vknqpr/L4mKel7HK 52Dvm1ag9fCTPq1Q4+tP9r5VLjUab9vlviJK/qKzQTi87gm4G/7LyWiUeKxfaVR0+Auu WZG4t3jaGhyXsm+UI11x3W9gU+6HcoTIrnKPm8rAe1CVWCrSg09EG7deX0zEzu1crVGP YprsGpl7j73PxwKbEx4YfU9KFokQmx+WJrF6Cw8ubwWfSNEF58k3r7cKLFzZEqMga6Al HIPfSVPb9ODKPS2JxenkL8cHkcU9rhh4GvZDDMYRLj3MeWtcLN+wYRH7rRo6A+Anaoys b5/g== X-Gm-Message-State: AA6/9RlvXYU+kuIb5Mi/LCdLKQoXgSl1zxJwJ6zH3SexYubk0/pnSbcDn3JAWiVMre3sMWBX X-Received: by 10.194.84.40 with SMTP id v8mr875886wjy.51.1476980238764; Thu, 20 Oct 2016 09:17:18 -0700 (PDT) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id us3sm79972856wjb.32.2016.10.20.09.17.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 09:17:17 -0700 (PDT) Subject: Re: zfs, a directory that used to hold lot of files and listing pause To: freebsd-stable@freebsd.org References: <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> From: Steven Hartland Message-ID: <40fa9fd6-15aa-d8f7-b958-8783e763e6bc@multiplay.co.uk> Date: Thu, 20 Oct 2016 17:17:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <4d9269af-ed64-bb73-eb7f-98a3f5ffd5a2@norma.perm.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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 16:17:20 -0000 Do you have atime enabled for the relevant volume? If so disable it and see if that helps: zfs set atime=off Regards Steve On 20/10/2016 14:47, Eugene M. Zheganin wrote: > 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. > > > Thanks. > > Eugene. > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"