Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2010 12:54:46 +0400 (MSD)
From:      "Igor V. Ruzanov" <igorr@canmos.ru>
To:        Erik Trulsson <ertr1013@student.uu.se>
Cc:        Kenton Varda <temporal@gmail.com>, freebsd-questions@freebsd.org, Robert Bonomi <bonomi@mail.r-bonomi.com>
Subject:   Re: EVFILT_VNODE doesn't scale to large directory trees?
Message-ID:  <Pine.LNX.4.64.1010251234230.24946@sta1.canmos.ru>
In-Reply-To: <20101025074234.GA71353@owl.midgard.homeip.net>
References:  <201010250446.o9P4kcid004004@mail.r-bonomi.com> <AANLkTi=SOjwVDzcmezRhiVPSEqXcBNZ9dGFC7GM_dqE8@mail.gmail.com> <Pine.LNX.4.64.1010251046430.24567@sta1.canmos.ru> <20101025074234.GA71353@owl.midgard.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Oct 2010, Erik Trulsson wrote:

|On Mon, Oct 25, 2010 at 10:48:58AM +0400, Igor V. Ruzanov wrote:
|> On Sun, 24 Oct 2010, Kenton Varda wrote:
|> 
|> |That doesn't answer my question.  I'm not even using make.  I could write a
|> |few thousand words describing exactly what I'm trying to do and why it does,
|> |in fact, make sense, but it's really beside the point.  I just want to know
|> |if there is any scalable way to monitor a very large directory tree for
|> |changes.  Is there?
|> |
|> Dig `kqueue' - its the native FreeBSD's events polling/notification 
|> mechanism.
|
|Since the OP mentioned using EVFILT_VNODE I would assume he is already
|using kqueue but is not satisfied with it.
|
I thought so too but was not sure about his problem. With 
kqueue()/kevent() we can monitor every open file descriptor. So how many 
files are laid down in the directory tree, 100, 1000, 15000? In every 
such way its possible to write or find already written daemon that 
monitors every file in selected folder doing several jobs in separate 
threads. There is might be little problem with receiving of *lots* events, 
so we could create several pipes (for example) for setting up of 
communication between deamon and system.
Note that we must remember to set proper meaning of kern.maxfiles sysctl 
variable.

+-------------------------------------------+
! CANMOS ISP Network                        !
+-------------------------------------------+
! Best regards                              !
! Igor V. Ruzanov, network operational staff!
! e-Mail: igorr@canmos.ru                   !
+-------------------------------------------+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.64.1010251234230.24946>