Increasing the maximum number of files open

Hi there!

In order to play a game with Lutris, it seems I need to be able to " increasing the maximum number of files open".

The wiki of Lutris states the familiar ways to achieve this; Editing /etc/systemd/system.conf and /etc/systemd/user.conf -> DefaultLimitNOFILE=524288.

This edit however, seems to have now effect on my machine:

Output of ulimit -Hn after reboot: 4096

The limit is most likely specific here: /usr/lib/systemd/system.conf.d/40-core-ulimit.conf

Am I missing something obvious? Are these kinds of settings (in /etc/...) not the way to configure Clear Linux?

Best regards,
Oliver

I had to specify it in /etc/security/limits.conf as described here: https://github.com/lutris/lutris/wiki/How-to:-Esync for it to take affect. . See @pmccarty’s response below for the proper way.

The default limit in CL is supposed to be high but might not working as intended. @pmccarty we were discussing this.

I had to specify it in /etc/security/limits.conf as described here: https://github.com/lutris/lutris/wiki/How-to:-Esync for it to take affect.

Thanks. I dismissed that because the wiki said “On Linux distributions not using Systemd …”, but obviously it is more nuanced than that.

The default value seems to have been 4096.
That is too low because of 3 use cases:

  • syncing files (syncthing)
  • compiling code and filesystem watchers (inotify)
  • games (apparently)

Just to be curious

your files were like

[Manager]                                                                       
DefaultLimitNOFILE=524288

for the systemd, user and system??

Still are :slight_smile:

> cat /etc/systemd/system.conf /etc/systemd/user.conf
[Manager]
DefaultLimitNOFILE=524288
[Manager]
DefaultLimitNOFILE=524288

Hi @bugabinga,

I ran into this exact issue the other day.

Because the configuration snippet /usr/lib/systemd/system.conf.d/50-nfiles.conf is installed, which sets DefaultLimitNOFILE=4096, you have to override the value with a configuration snippet in /etc/systemd/system.conf.d/ instead. Overriding DefaultLimitNOFILE in /etc/systemd/system.conf has no effect due to systemd’s config precedence order.

2 Likes