From owner-freebsd-stable@freebsd.org Tue Nov 10 12:09:23 2015 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 D9F55A2A324 for ; Tue, 10 Nov 2015 12:09:23 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 52C881F47 for ; Tue, 10 Nov 2015 12:09:22 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id tAAC9IRl070015 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Nov 2015 13:09:18 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id tAAC9HxQ070012; Tue, 10 Nov 2015 13:09:17 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Tue, 10 Nov 2015 13:09:17 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: "Eugene M. Zheganin" cc: freebsd-stable@freebsd.org Subject: Re: zfs, mc, mcview and files opening In-Reply-To: <5641DB05.7050209@norma.perm.ru> Message-ID: References: <5641BFC8.9050207@norma.perm.ru> <5641DB05.7050209@norma.perm.ru> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 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, 10 Nov 2015 12:09:23 -0000 On Tue, 10 Nov 2015 16:54+0500, Eugene M. Zheganin wrote: > Hi, > > on 10.11.2015 15:05, Trond Endrestøl wrote: > > I blame file(1), it's hopelessly slow. mcview uses file(1) to deduce > > if it should just display the damn file or run the file through some > > filter. Maybe an option in mc/mcview to disable the use of file(1) is > > an acceptable compromise. > Yeah, you seem to be right. /usr/bin/time -h file /var/log/maillog gives > same time of 37-40 seconds to process the file. > The main answer is now why file(1) is that slow ? I tested it on files > of about same size and UFS - there's no lag at all. > > Is it worth to report this in bugzilla ? This PR exists: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=148150 You might want to check out stable/10 r290152 onwards, as file 5.25 was recently merged from head. I'm still running stable/10 amd64 r290090, so upgrading to the latest stable/10 might help. I'll see if I can upgrade one my systems later this afternoon. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-stable@freebsd.org Tue Nov 10 12:11:36 2015 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 5DAF1A2A5C6 for ; Tue, 10 Nov 2015 12:11:36 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E7EB212A8 for ; Tue, 10 Nov 2015 12:11:35 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.14.9/8.14.9) with ESMTP id tAACBSjZ016458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 10 Nov 2015 13:11:29 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: markoml@markoturk.info Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id tAACBLGQ060247; Tue, 10 Nov 2015 19:11:21 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: zfs, mc, mcview and files opening To: Marko Turk , "Eugene M. Zheganin" References: <5641BFC8.9050207@norma.perm.ru> <20151110115654.GA1949@vps.markoturk.info> Cc: FreeBSD From: Eugene Grosbein Message-ID: <5641DEE9.703@grosbein.net> Date: Tue, 10 Nov 2015 19:11:21 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151110115654.GA1949@vps.markoturk.info> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.5 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_48_96, LOCAL_FROM autolearn=no version=3.3.2 X-Spam-Report: * 2.2 DATE_IN_FUTURE_48_96 Date: is 48 to 96 hours after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 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, 10 Nov 2015 12:11:36 -0000 On 10.11.2015 18:56, Marko Turk wrote: > Hi, > > On Tue, Nov 10, 2015 at 02:58:32PM +0500, Eugene M. Zheganin wrote: >> Hi. >> >> my midnight commander is terribly slow at vieweing files with mcview. >> Opening of a file of approximately 10 megabytes takes about 30-40 >> seconds. This isn't related with the compression setting, %busy wait or >> pool properties- I tested on various machines, it's fully reproducible. >> This lag appears on files about 1.5 megs in size, and the lag time is >> pretty constant. From my observation, it's the following syscall that's >> blocking: >> >> fstat(4,{ mode=p--------- ,inode=41,size=0,blksize=4096 }) = 0 (0x0) >> (observed using `truss mcview maillog`) >> >> If the file is viewed not by mcview (i.e. it is of a special type and >> viewed by the special utility, or mcview is simply not used - for >> example more opens same file without lag) - the file is opening fast as >> always. When mcview is involved - lag appears. In the same time I've >> never seen this lag on filesystems other than zfs. > > Is this happening on every ZFS FreeBSD install or just some of them? I'm > running ZFS on FreeBSD 10-STABLE and I don't see this problem (even for > much larger files). The problem has already been fixed with import of file-5.25 and MFC to stable/10: https://svnweb.freebsd.org/base?view=revision&revision=290152