From owner-freebsd-stable@freebsd.org Sat Sep 5 11:39:05 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 8BF9A9CB246 for ; Sat, 5 Sep 2015 11:39:05 +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 20E901C47 for ; Sat, 5 Sep 2015 11:39:04 +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 t85BcqXi037274 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 5 Sep 2015 13:38:54 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: Received: from [10.58.0.4] (dadv@[10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id t85BclQg092793 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sat, 5 Sep 2015 18:38:47 +0700 (KRAT) (envelope-from eugen@grosbein.net) Message-ID: <55EAD446.7020706@grosbein.net> Date: Sat, 05 Sep 2015 18:38:46 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-stable@freebsd.org Subject: Re: file(1) command very slow References: <55EAAD8D.9020902@aon.at> In-Reply-To: <55EAAD8D.9020902@aon.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM autolearn=no version=3.3.2 X-Spam-Report: * -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-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: Sat, 05 Sep 2015 11:39:05 -0000 05.09.2015 15:53, Martin Birgmeier пишет: > Running the file(1) command on a 7 MB text file takes much longer in > 10.2 than in 10.1. > > Example: > > # ll /tmp/x6 > -rw-r--r-- 1 root wheel 7384414 Sep 5 10:30 /tmp/x6 > # file /tmp/x6 > /tmp/x6: ASCII text > file /tmp/x6 26.12s user 0.00s system 99% cpu 26.237 total > # > > I have this on all my machines since installing 10.2. > > Any ideas on what is wrong? That's performance regression in the file-5.23 compared with file-5.22 bundled with earlier versions of FreeBSD. I have reported it upstream about 3 weeks ago but got no response: http://bugs.gw.com/view.php?id=474 For me, 5.23 is 130+ times slower than 5.22. Partially that's because of larger look-ahead buffer (1MB vs. 256K): https://github.com/file/file/commit/dd89d293fe62ca55542a5637e239b33404c58a8d However, backout of this change gets only 10 times speedup, not 130 times, so there should be more changes guilty. Eugene Grosbein