Monitor changes on share folders

General discussion related to "Everything".
Post Reply
MuhKuh
Posts: 1
Joined: Wed Nov 15, 2017 12:39 pm

Monitor changes on share folders

Post by MuhKuh »

Hey,

First off, thanks for the great tool. I use it instead of windows' search. I recently discovered you can also add share folder. I have some questions related to that:
  • Why is there a buffer size limit of 64 KB? What does the buffer do?
  • How does the monitoring work?
  • Is the service monitoring every file? Or is it using windows events?
  • Is it resource intensive to monitor many shares with lots of files?
Greetings,
MuhKuh
void
Developer
Posts: 16764
Joined: Fri Oct 16, 2009 11:31 pm

Re: Monitor changes on share folders

Post by void »

Why is there a buffer size limit of 64 KB?
This limit only exists for remote/networked folders, for local folders there is no limit.
The networked folder buffer size limit is 64k because that is the largest supported packet size on Windows.

See ReadDirectoryChanges for more information:
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
What does the buffer do?
The buffer stores the description of changes to your folder. Eg, file a.txt was renamed to b.txt, file foo.bar was deleted, etc..

This buffer will fill up as changes occur, Everything will process them ASAP. however, if Everything is unable to process changes quickly enough, the buffer will fill up, and if the buffer is full you can tell Everything to either rescan the entire folder or miss the changes (default option).

Each change is very roughly 256 bytes, so a 64k buffer will give you roughly 256 changes. If 256 changes occur before Everything reads this buffer, new changes will be missed.
How does the monitoring work?
The OS will save all changes to this buffer, Everything will read this buffer and process the changes in real-time.

See ReadDirectoryChanges for more information:
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Is the service monitoring every file? Or is it using windows events?
No, the Everything service is not needed for reading folder changes.
Everything uses ReadDirectoryChanges.
Is it resource intensive to monitor many shares with lots of files?
No, the number of files does not impact resources.
What will impact CPU usage / network bandwidth is the frequency and number of changes.
Post Reply