From owner-freebsd-current@FreeBSD.ORG Fri Mar 21 03:48:19 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1ED4B1065675 for ; Fri, 21 Mar 2008 03:48:19 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by mx1.freebsd.org (Postfix) with ESMTP id D45838FC14 for ; Fri, 21 Mar 2008 03:48:18 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1350872waf.3 for ; Thu, 20 Mar 2008 20:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=fa5EUjdsiV+b9a/Nraq2qc5LlKVijigc8HxqgpRmXSY=; b=tl8yYOQFH+mPcLzAMWGkonyIGNSNQo6CHukIYlpEooVqI0hRkFP+DHyXNes8faeCiWeJkvXzD1frf0NWdSo2jF143iEhPiuY8vZYPpLAGjP66WMBolCIq3HKKM2I7kXr3rrlgBjBLuhyVJSWg8WfwtCWiyiWiacjXEoXMCl6xPg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GbVGjKh1e4BRh0wv8CCQVp+tVsXWGYcAHlQCbaBqqPNYPiQDfo22aMhqv1ORC5CuPLTiNnjvPzhEN5kWWD2FJQs/t445YcpRMp8Cqy1E9NYfkSScamcn7LMmnnhGCBgJYt589chtlUFGRfDZA1Ij1PrJNxkieCWLHC6qRSv+2Dg= Received: by 10.114.193.1 with SMTP id q1mr4791006waf.75.1206071298081; Thu, 20 Mar 2008 20:48:18 -0700 (PDT) Received: by 10.115.22.10 with HTTP; Thu, 20 Mar 2008 20:48:17 -0700 (PDT) Message-ID: Date: Thu, 20 Mar 2008 20:48:17 -0700 From: "Kip Macy" To: "Steve Kargl" In-Reply-To: <20080321030254.GA98444@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080321030254.GA98444@troutmask.apl.washington.edu> Cc: freebsd-current@freebsd.org Subject: Re: Extremely slooooow __sys_ftruncate? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 03:48:19 -0000 "truncate" may be synchronous on FreeBSD - almost nothing is on Linux. -Kip On Thu, Mar 20, 2008 at 8:02 PM, Steve Kargl wrote: > In the process of helping to debug a problem with gcc-4.4.0 > (actually a gfortran problem), I run gprof on the executable. > The profile shows that __sys_ftruncate is extremely slow. > > % cumulative self self total > time seconds seconds calls ms/call ms/call name > 85.6 6.05 6.05 51830 0.12 0.12 __sys_ftruncate [2] > 5.6 6.44 0.40 0 100.00% .mcount (101) > 1.7 6.56 0.12 51872 0.00 0.00 _lseek [5] > 1.6 6.67 0.11 52055 0.00 0.00 sigprocmask [6] > 0.8 6.73 0.06 103687 0.00 0.00 memset [14] > 0.4 6.76 0.03 488 0.06 0.06 __sys_write [18] > 0.4 6.79 0.03 0 100.00% formatted_transfer_scalar > > time ./z > 184.21 real 0.98 user 6.57 sys > > This program should finish well under 184 seconds. The same program > and exact same gcc/gfortran source on linux shows > real 0m0.555s user 0m0.103s sys 0m0.452s > > Is __sys_ftruncate known to have performance problems? > > -- > Steve > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >