Date: Fri, 21 Mar 2008 07:06:29 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Kip Macy <kip.macy@gmail.com> Cc: freebsd-current@freebsd.org, Steve Kargl <sgk@troutmask.apl.washington.edu> Subject: Re: Extremely slooooow __sys_ftruncate? Message-ID: <20080321050629.GS10374@deviant.kiev.zoral.com.ua> In-Reply-To: <b1fa29170803202048v41e3118dj27b673ad5bc7a81@mail.gmail.com> References: <20080321030254.GA98444@troutmask.apl.washington.edu> <b1fa29170803202048v41e3118dj27b673ad5bc7a81@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--XhDIt1ZqED2V8RHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 20, 2008 at 08:48:17PM -0700, Kip Macy wrote: > "truncate" may be synchronous on FreeBSD - almost nothing is on Linux. Partial truncate is synchronous for UFS mounts. Full truncate (to 0 lenght) also may become synchronous under high i/o pressure. >=20 > -Kip >=20 > On Thu, Mar 20, 2008 at 8:02 PM, Steve Kargl > <sgk@troutmask.apl.washington.edu> 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_transfe= r_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? --XhDIt1ZqED2V8RHq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfjQlQACgkQC3+MBN1Mb4hdtwCfYMtBdsqyFgSONLhtnhOY044I pMYAn0G9FLvgyqaoY2Rhbnq8p94Dco71 =DIQM -----END PGP SIGNATURE----- --XhDIt1ZqED2V8RHq--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080321050629.GS10374>