Depends on kernel, I can.
----
root@woodstock:/home/axel# echo "4000000" >
/proc/sys/fs/inotify/max_user_watches
root@woodstock:/home/axel# cat /proc/sys/fs/inotify/max_user_watches
4000000
----
My limit is somewhere at 800 billion directories,
---
root@woodstock:/home/axel# echo "800000000000" >
/proc/sys/fs/inotify/max_user_watches
root@woodstock:/home/axel# echo "810000000000" >
/proc/sys/fs/inotify/max_user_watches
bash: echo: write error: Invalid argument
------
I however do not know how many kernel memory is eaten by the lot of
directories. About your usecase, if any possible I would just try it
out and see what happens :-)
> I guess it would be safer for lsyncd just to write changed files/
> directories to a file and have separate process that reads the file
> and does rsync.
>
> I'm not familiar with Linux programming event model, but I assume the
> "action" can run in a separate thread so that it doesn't block the
> event handler that gets system notifications.
> This action thread can run continuously and have some communication
> between main (even handler) thread and "action" thread, a queue for
> the action thread to process.
Well it depends, as long as you only want 1 rsync operation to run at
the same time, you don't gain anything, altough you would retrain
control a tad earlier, lsyncd would nevertheless have to wait for the
first rsync operation to complete.
In case you do not want to wait for rsync to finish, but start several
operations at once, you do not need to change the code big time also,
just skip the waiting routine. Altough this cannot be commandline
configured at the moment, this is just a minor code edit. This is a
design decission, I for one wanted to limit load by limiting to 1
rsync operation at a time. I would advice against using several at
once, as you would need special logic to determine if the operations
would get in conflict, like syncing a directory and a parent direcoty
or so... this logic is not coded.
- Axel