fam vs gamin
Jean-Yves Lefort
jylefort at FreeBSD.org
Mon Jan 23 12:26:18 PST 2006
On Mon, 23 Jan 2006 07:56:54 +0100
Alex Dupre <ale at FreeBSD.org> wrote:
> Kris Kennaway wrote:
> > Are devel/fam and gamin supposed to be compatible? They both provide
> > a libfam, but since I switched from fam to gamin, my courier-imap is
> > segfaulting. This persists after I rebuild it.
>
> The library should be 100% compatible, since gamin uses the fam
> interface, but it doesn't implement all the fam functions (for a
> complete list of differences look here:
> http://www.gnome.org/~veillard/gamin/differences.html). If your
> courier-imap doesn't do something unsupported in gamin, the libraries
> should be completely interchangeble.
> *But* I'm working at my real job on a project using gamin, and just
> friday I found a very strange behaviour (probably a bug) of gamin with
> kqueue backend monitoring a few directories with thousands of files
> inside (lost or delayed events). Switching to polling solved the
> problem, this is the reason I think it's a kqueue implementation bug.
> Today I'll do other tests, more accurately. Stay tuned.
The delays are likely caused by the fact that you have reached the
file descriptor limit; beyond that limit, gamin can no longer monitor
files with kqueue, and has to periodically lstat() them. You should
try to set a very large kern.maxfiles in /boot/loader.conf (you need
one file descriptor per monitored file); see pkg-message for details.
However, events should never be lost (although they can be
substantially delayed when monitoring a very large directory on a slow
machine, because event processing time increases linearly with the
number of files contained in the directory). Please cc your findings
to me.
--
Jean-Yves Lefort
jylefort at FreeBSD.org
http://lefort.be.eu.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060123/56d3926b/attachment.bin
More information about the freebsd-ports
mailing list