Impact of having a large number of open file descriptors

Suleiman Souhlal ssouhlal at FreeBSD.org
Thu May 29 16:48:35 UTC 2008


On May 28, 2008, at 7:46 AM, Oliver Fromme wrote:

> Ivan Voras wrote:
>> Im thinking again of the old idea of implementing poor man's file
>> replication system using kqueue to monitor changes on files.
>
> It would be cool to have a kernel interface so you could
> attach to a mountpoint and receive a log of all activity
> on that file system.  That's similar to what DragonFly's
> journaling feature does.
>
> Unfortunately the kqueue interface isn't capable of doing
> something like that ...  So this is not an answer to your
> question, I'm afraid.

I have an old patch that makes kqueue monitor every file write on the  
system and return the inode number in the knote's data field: http:// 
people.freebsd.org/~ssouhlal/testing/kqueue-anyvnode-20050503.diff .

I'd think it shouldn't be too hard to make it per-mountpoint..

>> While at it, will EVFILT_VNODE and NOTE_WRITE catch "additional" ways
>> the file can be modified, meaning mmap()?

I think it does, although it will get delayed until the mmapped pages  
get flushed to disk.

-- Suleiman


More information about the freebsd-hackers mailing list