inotify 事件丢失的那点事_黑色星期五_新浪博客
昨儿个同事让我帮其解决他一直悬而不决的inotify丢事件的问题,我下面是我对inotify参数调整的理解
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192000
fs.inotify.max_queued_events = 1638400
/proc/sys/fs/inotify/max_queued_events
The value in this file is used when an application calls inotify_init(2) to set an upper limit on the number of events that can be queued to the corresponding inotify instance. Events in excess of this limit are dropped, but an IN_Q_OVER-FLOW event is always generated.
这个参数很重要决定了对应的inotify实例监控事件队列大小,如果对应的inotify实例的监控的并发事件很高,那么需要加大这个值,不然就会丢事件
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192000
fs.inotify.max_queued_events = 1638400
转载请注明:爱开源 » inotify 事件丢失的那点事