From owner-freebsd-hackers Mon Jul 19 13:47:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 550C5152C7 for ; Mon, 19 Jul 1999 13:47:43 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id NAA99619; Mon, 19 Jul 1999 13:45:08 -0700 (PDT) (envelope-from dillon) Date: Mon, 19 Jul 1999 13:45:08 -0700 (PDT) From: Matthew Dillon Message-Id: <199907192045.NAA99619@apollo.backplane.com> To: "Leif Neland" Cc: Subject: Re: speed of file(1) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Check the size of the magic files on your FreeBSD and Linux boxen. file was never really designed to be efficient. FreeBSD's magic file is /usr/share/misc/magic - around 164K. -Matt : :While trying to port amavis, the virusscanner for mail, : http://aachalon.de/AMaViS/amavis-0.2.0-pre4.tar.gz ) I noticed it used the :file(1) several times for each file, and it took rather long time, causing :bb to report red for high CPU-load each time I collected a batch of mail. : :So I compared it with a Linux box: : :My 60MHz Pentium, FreeBSD : :time file /usr/home/leif/vnc-3.3.2r :/usr/home/leif/vnc-3.3.2r3_unixsrc.tgz: gzip compressed data, deflated, :original filename, last modified: Thu Jan 21 19:23:21 1999 : :real 0m1.237s :user 0m0.758s :sys 0m0.394s : :133MHz Pentium II, Linux : :time file vnc-3.3.2r3_unixsrc.tgz :vnc-3.3.2r3_unixsrc.tgz: gzip compressed data, deflated, original filename, :last modified: Thu Jan 21 19:23:21 1999, os: Unix : :real 0m0.036s :user 0m0.010s :sys 0m0.030s : :While I realise 60MHz is less than 133MHz, a factor 34 in difference of real :time seems suspect. : :The magic file is different, but almost the same size. : :Why is FreeBSD's file so much slower? : :Leif : : : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-hackers" in the body of the message : Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message