Very useful info!

BTW, I fully agree with rationale behind the choice.

Thank you

Da: Kamil Paral <kparal@redhat.com>
Inviato: venerd́ 30 agosto 2019 15:23
A: coreos@lists.fedoraproject.org <coreos@lists.fedoraproject.org>
Oggetto: [CoreOS] Re: Default Max Open File too high?
 
On Fri, Aug 30, 2019 at 3:11 PM <domenico.viggiani@gmail.com> wrote:
Hi,
I'm having some issues with value of Max Open Files on CoreOS 2079.4.0:
# sudo cat /proc/sys/fs/nr_open
1073741816
It is "too high" compared to Linux usual value (1048576 ) and it causes some troubles ("unable to allocate file descriptor table") to some Java applications, similar to this:
https://bugs.openjdk.java.net/browse/JDK-8150460

Any suggestion?

AFAIK, this is not CoreOS specific nor Fedora specific. It is the new "Linux" default for all distributions using systemd (and not overriding the value). Here's the relevant change:
And from the diff, this part is relevant:

        * The fs.nr_open and fs.file-max sysctls are now automatically bumped
          to the highest possible values, as separate accounting of file
          descriptors is no longer necessary, as memcg tracks them correctly as
          part of the memory accounting anyway. Thus, from the four limits on
          file descriptors currently enforced (fs.file-max, fs.nr_open,
          RLIMIT_NOFILE hard, RLIMIT_NOFILE soft) we turn off the first two,
          and keep only the latter two. ...

I'm not a developer, but this looks like something that needs to get fixed in OpenJDK. Perhaps there is someone who can advise some workaround.