0

In Linux, one can configure soft and hard limits of file handles per user, app or system globally. I understand that this is a security feature to prevent one app consuming too many resources. But:

Does it have any negative consequences when I raise the limit for an app even if it doesn't consume it?

Besides security concerns, what are the impacts of many open file handles in Linux? Will performance degrade? Do file handles consume memory?

Sebi
  • 8,323
  • 6
  • 48
  • 76
  • Since a file handle is a number, it consumes at least the bytes of memory which are required to store that number. But of course only if it's in use. If you raise the limit for a process which would not use those handles, then no additional memory is used. – hek2mgl Feb 20 '20 at 09:20
  • The obvious downside of a higher limit is that high application load, or even a just a bug in the program could exhaust system resources more excessively than with a lower limit. – hek2mgl Feb 20 '20 at 09:21

0 Answers0