Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
During real-time file monitoring in progress, many file discriptors are created. Would there be any impacts on performance if a large numbers of file discriptors generated?
(In case of approaching the maximum count.
Massive amount of file discriptors are opened from fanotify event.)
yes, actually I was thinking about the following question[s]: What are you talking about, what kind or performance do you mean? How much is that "many file descriptors" at all?
I am making anti-virus real-time monitoring system (using fanotify).
Fd is opened when a fanotify event (like open, access, close) occurs.
If the file scan takes a long time, the fd is stored in the queue with open status.
In fact, I'm a Windows platform developer and I didn't understand Linux enough, so I asked.
Thanks for all comments.
Currently, when an event occurs, the file path will be collected, fd is immediately closed, stored in the queue, and then opened again for use.
Maybe it would be better to do the fanotify_init on the root, and only have the one fd (permanently) open ?. You still get the notifications without the continual setup/teardown cost.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.