[STEP] Limitation of the amount of the file which can be opened by Linux program

Step One: In system level, set the limitation of the amount of the files which can be opened by the user who running the Linux Program

# vi /etc/security/limites.conf

Add these lines:

......
rmt  -       nofile  1024
rmt  -       nproc   1024

(Add: Setting the rmt user can open 8192 files and 8192 processes in this Linux as an example here)

Step Two: In program level, check the setting of the amount of the files which can be opened by Linux program

# /bin/systemctl show 'rmt-server-mirror.service' | sort
......
LimitNOFILE=524288
......

(Add: The amount of opening the file by program rmt-server-mirror.service is limited at 8096 as an example here)

[CONTENT] Linux recommended swap size

Content:

For RHEL 6, RHEL 7, RHEL 8, RHEL 9

RAM sizeRecommended swap sizeRecommended swap size if allowing for hibernation
From 0 to 2GB 2 times the RAM size3 times the RAM size
From 2GB to 8GBThe same size of the RAM2 times the RAM size
From 8GB to 64GBAt least 4GB1.5 times the RAM size
From 64GBAt least 4GBHibernation is not recommended
RHEL 6, RHEL 7, RHEL 8, RHEL 9 Recommended Swap Size Table

Note: A 100GB swap is recommended if system with over 140 logical processes or over 3TB RAM

Reference:

https://access.redhat.com/solutions/15244