Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread David Xu
Tim Kientzle wrote: I recall Matt talking about implementing gettimeofday() without a syscall. The basic idea is to have the kernel record some constants in a page that's mapped across all processes, then libc can just read the time from a known location. It might be nice to combine this with

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets )

2006-05-09 Thread Scott Long
Sven Petai wrote: On Tuesday 09 May 2006 20:35, Julian Elischer wrote: Sven Petai wrote: are there any patches that take the gettimeofday() calls and replace them with something that is cheap such as only doing every 10th one and just returning the last value ++ 1 uSec for the other ones.. a

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Tim Kientzle
David Xu wrote: On Wednesday 10 May 2006 02:23, Kris Kennaway wrote: There are at least several issues here: ...This may be general issues like gettimeofday() on Linux vs FreeBSD; clearly there is something *very big* to blame here. Mysql does do *lots* of such calls ... My last recall is t

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets )

2006-05-09 Thread Sven Petai
On Tuesday 09 May 2006 20:35, Julian Elischer wrote: > Sven Petai wrote: > > are there any patches that take the gettimeofday() calls and replace > them with something that is cheap > such as only doing every 10th one and just returning the last value ++ 1 > uSec for the other ones.. > > a ktrace o

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread David Xu
On Wednesday 10 May 2006 02:23, Kris Kennaway wrote: > There are at least several issues here: > > * Factor of >two difference in performance across the board (all > loads) relative to Linux. This may be general issues like > gettimeofday() on Linux vs FreeBSD; clearly there is something *very > b

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Paul Allen
>From Julian Elischer <[EMAIL PROTECTED]>, Tue, May 09, 2006 at 10:35:06AM >-0700: > Sven Petai wrote: > > are there any patches that take the gettimeofday() calls and replace > them with something that is cheap > such as only doing every 10th one and just returning the last value ++ 1 > uSec f

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Kris Kennaway
On Tue, May 09, 2006 at 11:13:02AM -0700, Greg 'groggy' Lehey wrote: > On Monday, 8 May 2006 at 21:11:09 -0400, Kris Kennaway wrote: > > On Mon, May 08, 2006 at 08:43:28PM -0400, Kris Kennaway wrote: > >> On Mon, May 08, 2006 at 02:52:07AM -0400, Kris Kennaway wrote: > >>> OK, David's patch fixes

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Kris Kennaway
On Tue, May 09, 2006 at 06:18:11PM +0300, Sven Petai wrote: > On Tuesday 09 May 2006 03:42, Kris Kennaway wrote: > > On Tue, May 09, 2006 at 03:34:59AM +0300, Sven Petai wrote: > > > > Hmm, with this patch mysql 4.1 seems to crash at startup. I haven't > > > > yet had time to investigate. Is anyo

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Greg 'groggy' Lehey
On Monday, 8 May 2006 at 21:11:09 -0400, Kris Kennaway wrote: > On Mon, May 08, 2006 at 08:43:28PM -0400, Kris Kennaway wrote: >> On Mon, May 08, 2006 at 02:52:07AM -0400, Kris Kennaway wrote: >>> OK, David's patch fixes the umtx thundering herd (and seems to give a >>> 4-6% boost). I also fixed

Re: Fine-grained locking for POSIX local sockets (UNIXdomain sockets)

2006-05-09 Thread Steven Hartland
Julian Elischer wrote: are there any patches that take the gettimeofday() calls and replace them with something that is cheap such as only doing every 10th one and just returning the last value ++ 1 uSec for the other ones.. a ktrace of Mysql shows a LOT of gettimeofday() calls. Yes there ar

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Maxim Konovalov
On Tue, 9 May 2006, 10:35-0700, Julian Elischer wrote: > Sven Petai wrote: > > are there any patches that take the gettimeofday() calls and replace > them with something that is cheap such as only doing every 10th one > and just returning the last value ++ 1 uSec for the other ones.. > > a ktrace

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Julian Elischer
Sven Petai wrote: are there any patches that take the gettimeofday() calls and replace them with something that is cheap such as only doing every 10th one and just returning the last value ++ 1 uSec for the other ones.. a ktrace of Mysql shows a LOT of gettimeofday() calls. On Tuesday 09 M

Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets)

2006-05-09 Thread Sven Petai
On Tuesday 09 May 2006 03:42, Kris Kennaway wrote: > On Tue, May 09, 2006 at 03:34:59AM +0300, Sven Petai wrote: > > > Hmm, with this patch mysql 4.1 seems to crash at startup. I haven't > > > yet had time to investigate. Is anyone else seeing this? > > > > Seems to run fine here with 4.1.18 on a