Re: [RFC/PATCH] Nonotify - A simplistic way to determine directory content changes



On Thu, 2004-06-03 at 14:34, John McCutchan wrote:
> On Tue, 2004-06-01 at 22:52, nf wrote:
> > Ok. Here is my nonotify benchmark:
> > 
> > first i created a list of all the directories in my /usr dir.
> > 
> > $ find /usr -type d > dirlist.txt
> > 
> > $ cat -n  tells me that it's 13625 directories.
> > 
> > then i run the attached program nonotify_bench.c with dirlist.txt. 
> > The program calls stat() on every entry of dirlist.txt.
> > 
> > $ ./nonotify_bench dirlist.txt
> 
> After running find, all of these directories are cached. So again you
> are only measuring system call time. Run this with a cold cache after a
> reboot.

Sure - That's true. The first time you read or stat all those
directories will take a lot longer. But that's the case for any polling
or notification system. Mo matter if it's dnotify, inotify, nonotify or
any other - they all need to access the directory inodes they want to
monitor (which means they get cached). The only difference for nonotify
is, that it doesn't pin those inodes down.

Norbert









[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]