Re: [Dovecot] How to get rid of locks

2007-05-14 Thread Timo Sirainen
On Sat, 2007-04-07 at 22:30 +0300, Timo Sirainen wrote: > I just figured out that O_APPEND is pretty great. If the operating > system updates seek position after writing to a file opened with > O_APPEND, writes to Dovecot's transaction log file can be made > lockless. Well, almost. Log rotat

Re: [Dovecot] How to get rid of locks

2007-04-08 Thread Timo Sirainen
On 8.4.2007, at 12.41, Miquel van Smoorenburg wrote: On Sat, 2007-04-07 at 22:30 +0300, Timo Sirainen wrote: Although Dovecot is already read-lockless and it uses only short- lived write locks, it's be really nice to just get rid of the locking completely. :) I just figured out that O_APPEND i

Re: [Dovecot] How to get rid of locks

2007-04-08 Thread Miquel van Smoorenburg
On Sat, 2007-04-07 at 22:30 +0300, Timo Sirainen wrote: > Although Dovecot is already read-lockless and it uses only short- > lived write locks, it's be really nice to just get rid of the locking > completely. :) > > I just figured out that O_APPEND is pretty great. If the operating > system

Re: [Dovecot] How to get rid of locks

2007-04-08 Thread Daniel L. Miller
Timo Sirainen wrote: Although Dovecot is already read-lockless and it uses only short-lived write locks, it's be really nice to just get rid of the locking completely. :) I just figured out that O_APPEND is pretty great. If the operating system updates seek position after writing to a file op

Re: [Dovecot] How to get rid of locks

2007-04-07 Thread Cor Bosman
Hi Timo, > OS X. Could you BSD people try if it works there? http://dovecot.org/ > tmp/append.c and see if it says "offset = 0" (bad) or non-zero (yay). FreeBSD 6.2: offset = 5 FreeBSD 4.10: offset = 5 FreeBSD 4.7: offset = 5 NetBSD 3.0.1: offset = 5 Cor

Re: [Dovecot] How to get rid of locks

2007-04-07 Thread Nils Vogels
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Timo Sirainen wrote on 7-4-2007 21:30: > Could you BSD people try if it works there? > http://dovecot.org/tmp/append.c and see if it says "offset = 0" > (bad) or non-zero (yay). The O_APPEND at least doesn't work with > NFS, so it'll have to be option

Re: [Dovecot] How to get rid of locks

2007-04-07 Thread Johan Fredin
Timo Sirainen wrote: I see that this works with Linux and Solaris, but not with OS X. Could you BSD people try if it works there? http://dovecot.org/tmp/append.c and see if it says "offset = 0" (bad) or non-zero (yay). OpenBSD 3.9 and 4.0 (i386) both give me 5, 10, 15 and so on, so yay! /Joha

Re: [Dovecot] How to get rid of locks

2007-04-07 Thread Mark E. Mallett
On Sat, Apr 07, 2007 at 10:30:25PM +0300, Timo Sirainen wrote: > > I just figured out that O_APPEND is pretty great. If the operating > system updates seek position after writing to a file opened with > O_APPEND, writes to Dovecot's transaction log file can be made > lockless. I see that thi

Re: [Dovecot] How to get rid of locks

2007-04-07 Thread Jim Maenpaa
On Apr 7, 2007, at 12:30, Timo Sirainen wrote: Although Dovecot is already read-lockless and it uses only short- lived write locks, it's be really nice to just get rid of the locking completely. :) I just figured out that O_APPEND is pretty great. If the operating system updates seek posi

[Dovecot] How to get rid of locks

2007-04-07 Thread Timo Sirainen
Although Dovecot is already read-lockless and it uses only short- lived write locks, it's be really nice to just get rid of the locking completely. :) I just figured out that O_APPEND is pretty great. If the operating system updates seek position after writing to a file opened with O_APPEN