On Mon, Aug 10, 2020 at 10:36:32PM +0200, Peter Zijlstra wrote: > On Mon, Aug 10, 2020 at 07:45:18AM -0700, Andi Kleen wrote: > > > Unfortunately we're kind of stuck with the old NFILE=1024 default > > even though it makes little sense on modern servers. > > Why can't that be changed? It seems to me all of userspace changes all > the time; heck that system-doofus thing flushed 20+ years of sysadmin > experience down the drain, just cause. Why can't we up a file limit?
We could try, but I believe it's hard coded in various places outside the kernel. But this wouldn't solve the problem of the unnecessary overhead of the inode + file descriptor per event that the patch was trying to address. It would just waste more memory. And increasing it makes the worst case memory consumption you complained about event worse because the real limit per uid i RLIMIT_NPROC*RLIMIT_FILES. Of course NPROC needs to be large enough too, so the total just becomes bigger and bigger. Ultimatively you need another accounting mechanism that actually works per uid without extra factors. Now perf already has one so it's still unclear to me why we can't use it. -Andi