News for hackers. Stuff that matters.
Re:Too Many Open Files by gnulinux on Friday June 06, 2025 @12:28PM (#44202500)
It's not that it's a proxy for memory use, but FD is its own resource, I've seen many software with FD leak (i.e. they open a file and forget about it, if they need the file again, they open another FD) so this limit can be a method to tell that it's leaking. Whether that's a good idea/necessary depends on the application.
Re:Too Many Open Files by quotemstr on Friday June 06, 2025 @01:05PM (#44202894)
Then account for _kernel memory used_ by file descriptors and account it like any other ulimit. Don't impose a cap on file descriptors in particular. These caps distort program design throughout the ecosystem
Re:Too Many Open Files by Dwedit on Friday June 06, 2025 @03:30PM (#44204176)
It's not just memory, it's cleanup that the Kernel must perform when the process terminates.
Re:Too Many Open Files by quotemstr on Friday June 06, 2025 @03:41PM (#44204262)
So? Doesn't matter. Account for the thing you want to control directly. Don't put caps on bad proxies for the thing you want to control.
Re:Too Many Open Files by tedunangst on Friday June 06, 2025 @03:56PM (#44204396)
Don't leak things with limits.
Re:Too Many Open Files by quotemstr on Friday June 06, 2025 @07:15PM (#44206006)
It's not a "leak" if you're actually using it, you know.