Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2015 13:09:17 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: zfs, mc, mcview and files opening
Message-ID:  <alpine.BSF.2.20.1511101303570.22820@mail.fig.ol.no>
In-Reply-To: <5641DB05.7050209@norma.perm.ru>
References:  <5641BFC8.9050207@norma.perm.ru> <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no> <5641DB05.7050209@norma.perm.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <owner-freebsd-stable@freebsd.org>
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 <freebsd-stable@mailman.ysv.freebsd.org>;
 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 <freebsd-stable@freebsd.org>; 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 <markoml@markoturk.info>,
 "Eugene M. Zheganin" <emz@norma.perm.ru>
References: <5641BFC8.9050207@norma.perm.ru>
 <20151110115654.GA1949@vps.markoturk.info>
Cc: FreeBSD <freebsd-stable@freebsd.org>
From: Eugene Grosbein <eugen@grosbein.net>
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 <freebsd-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-stable>, 
 <mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>;
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1511101303570.22820>