[Dovecot] Dovecot waking every 50ms when doing nothing
Timo Sirainen
tss at iki.fi
Sun Jun 3 18:48:30 EEST 2007
On Sun, 2007-06-03 at 16:29 +0100, Ross Burton wrote:
> My poor laptop is running a IMAP server, a HTTP server and a SMTP
> server.
>
> > > This fixes it for imap/pop3-login:
> > > http://hg.dovecot.org/dovecot/rev/0021765627f3
>
> Sweet, although this still wakes up when there are clients connected
> right?
Right.
> > struct idle_timeout *idle_timeout_new(unsigned int secs,
> > timeout_callback_t *callback, void *context);
> > void idle_timeout_free(struct idle_timeout *idle);
> > void idle_timeout_reset(struct idle_timeout *idle);
> >
> > The code would internally keep just one timeout handler and whenever
> > it's called, calculate the new time when it should be called.
>
> Sounds like what GLib does. Glib also (in 2.13 onwards) lets you create
> timeouts with second-resolution, so that N timers that go off at roughly
> the same time do actually go off at the same time, meaning the
> application wakes up once instead of N times.
Sounds like a good idea. I guess this could be implemented to Dovecot too.
> I presume porting Dovecot to use the glib main loop abstraction (which
> is nice and lean, the object system is a separate library) is out of the
> question?
I've used GLib before. The biggest problem I see with it is that it
doesn't support memory pools. That's why I duplicated most of its useful
functionality originally instead of just using it directly. So I think
it's much better to fix Dovecot's main loop code to work better instead
of adding a dependency to GLib and using only a tiny part of it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070603/f6d2a734/attachment.bin
More information about the dovecot
mailing list