[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

[CONTENT] System local ports batch occupation

Content One: Occupy system local ports manually

# startport=33000;endport=34000;for i in $(seq $startport $endport);do nc -lk $i &;done

(Add: Take start port is 33000 and end port is 34000 as an example here)

Content Two: Release all ports which are opened manually (kill all nc command processes)

# for i in $(ps -aux | grep nc | grep '\-lk' | awk '{print $2}');do kill $i; done