Date: Thu, 27 Oct 2005 14:04:05 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: David Xu <davidxu@freebsd.org>, Marian Hettwer <MH@kernel32.de>, current@freebsd.org Subject: Re: MySQL Performance 6.0rc1 Message-ID: <20051027140031.L32255@fledge.watson.org> In-Reply-To: <21905.1130409449@critter.freebsd.dk> References: <21905.1130409449@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Oct 2005, Poul-Henning Kamp wrote: >>> Why would anybody take a timestamp at all I/O syscalls ? >>> >>> "I wonder why my car can only go 30 km/h with the trunk full of >>> concrete" ? >>> >>> In a data base application I could possibly understand a timestamp >>> after every write. >>> >>> But after _all_ I/O syscalls ? That's just plain stupid... >> >> Don't panic, I agree that is stupid code, but I can not change it, it >> is not written by me, sorry! > > I'm not panicing, I'm merely pointing out that we should not optimize > performance after bogus code but rather try to improve it. There is, of course, a tension in optimizing systems to speed up applications that have been optimized for other systems. :-) Sadly, POSIX doesn't say anything about how applications can express preferences about the cost and granularity of time measurement. It's long been an issue though: AFS used to do magic on many UNIX systems to expose a timer tick timestamp to user space from the kernel via a special magic page. This trick has been used lots of other places to, but worked on the assumption that an application would be willing to pay a lower cost to get a poor measurement of time frequently, rather than pay a higher cost to get a time measurement less frequently. For user space applications implementing network protocols, this is important since they do need accurate measurements of round-trip time in order to calculate bandwidth windows, etc. We almost want clock_gettime() with CLOCK_TENMS, or the like. Robert N M Watson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051027140031.L32255>