Open File Limits

When using MAGS with a remote linux system, you always have to keep in mind that there are defined present limits for simultaneous open files. In some environments, when having a large number of parallel backup jobs started by a MAGS instance, these limits can be reached, which will lead to performance degradation.

System settings

Here are examples on how to check the current system configuration and how to change it, if needed:

[root@linuxhost ~]# cat /proc/sys/fs/file-max
104733000

or…

[root@linuxhost ~]# sysctl -a|grep fs.file-max
fs.file-max = 104733000

Setting a new value:

sysctl -w fs.file-max=999500

This will only persist until the next reboot. To set it permanently:

vi      /etc/sysctl.conf

Add the following line at the end:

fs.file-max=999500

Then, either log out and in again or issue sysctl -p to change the current settings.

User settings

To check the user file limit settings, issue:

[root@linuxhost ~]# cat /etc/security/limits.conf
root                    soft    nofile         999500
root                hard    nofile         999500
mags                soft    nofile         999500
mags                hard    nofile         999500

Or for a specific user:

[root@linuxhost ~]# ulimit -n
999500
[root@linuxhost ~]# su - mags

Last login: Tue Jan 25 10:14:26 CET 2022 on pts/6

[mags@linuxhost ~]$ ulimit -n
999500

These can then be edited by issuing:

vi etc/security/limits.conf

Then, log out and in again.