File tree Expand file tree Collapse file tree
Master/Tree/Deployment-and-Maintenance
V1.3.0-2/Deployment-and-Maintenance
latest/Deployment-and-Maintenance
Master/Tree/Deployment-and-Maintenance
V1.3.0-2/Deployment-and-Maintenance
latest/Deployment-and-Maintenance Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22
150150
151151### Other Configuration
152152
153- 1 . Disable the system swap memory
153+ 1 . Reduce the system swap priority to the lowest level
154154
155155``` Bash
156156echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -159,9 +159,10 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
159159swapoff -a && swapon -a
160160# Make the configuration take effect without restarting.
161161sysctl -p
162- # Check memory allocation, expecting swap to be 0
162+ # Swap's used memory has become 0
163163free -m
164164```
165+
1651662 . Set the maximum number of open files to 65535 to avoid the error of "too many open files".
166167
167168``` Bash
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22
150150
151151### Other Configuration
152152
153- 1 . Disable the system swap memory
153+ 1 . Reduce the system swap priority to the lowest level
154154
155155``` Bash
156156echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -159,9 +159,10 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
159159swapoff -a && swapon -a
160160# Make the configuration take effect without restarting.
161161sysctl -p
162- # Check memory allocation, expecting swap to be 0
162+ # Swap's used memory has become 0
163163free -m
164164```
165+
1651662 . Set the maximum number of open files to 65535 to avoid the error of "too many open files".
166167
167168``` Bash
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22
150150
151151### Other Configuration
152152
153- 1 . Disable the system swap memory
153+ 1 . Reduce the system swap priority to the lowest level
154154
155155``` Bash
156156echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -159,7 +159,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
159159swapoff -a && swapon -a
160160# Make the configuration take effect without restarting.
161161sysctl -p
162- # Check memory allocation, expecting swap to be 0
162+ # Swap's used memory has become 0
163163free -m
164164```
1651652 . Set the maximum number of open files to 65535 to avoid the error of "too many open files".
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口
162162
163163### 其他配置
164164
165- 1 . 关闭系统 swap 内存
165+ 1 . 将系统 swap 优先级降至最低
166166
167167``` Bash
168168echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
171171swapoff -a && swapon -a
172172# 在不重启的情况下使配置生效。
173173sysctl -p
174- # 检查内存分配,预期 swap 为 0
174+ # swap的已使用内存变为0
175175free -m
176176```
177177
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口
162162
163163### 其他配置
164164
165- 1 . 关闭系统 swap 内存
165+ 1 . 将系统 swap 优先级降至最低
166166
167167``` Bash
168168echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
171171swapoff -a && swapon -a
172172# 在不重启的情况下使配置生效。
173173sysctl -p
174- # 检查内存分配,预期 swap 为 0
174+ # swap的已使用内存变为0
175175free -m
176176```
177177
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口
162162
163163### 其他配置
164164
165- 1 . 关闭系统 swap 内存
165+ 1 . 将系统 swap 优先级降至最低
166166
167167``` Bash
168168echo " vm.swappiness = 0" >> /etc/sysctl.conf
@@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
171171swapoff -a && swapon -a
172172# 在不重启的情况下使配置生效。
173173sysctl -p
174- # 检查内存分配,预期 swap 为 0
174+ # swap的已使用内存变为0
175175free -m
176176```
177177
You can’t perform that action at this time.
0 commit comments