Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22

### Other Configuration

1. Disable the system swap memory
1. Reduce the system swap priority to the lowest level

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -159,9 +159,10 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# Make the configuration take effect without restarting.
sysctl -p
# Check memory allocation, expecting swap to be 0
# Swap's used memory has become 0
free -m
```

2. Set the maximum number of open files to 65535 to avoid the error of "too many open files".

```Bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22

### Other Configuration

1. Disable the system swap memory
1. Reduce the system swap priority to the lowest level

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -159,9 +159,10 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# Make the configuration take effect without restarting.
sysctl -p
# Check memory allocation, expecting swap to be 0
# Swap's used memory has become 0
free -m
```

2. Set the maximum number of open files to 65535 to avoid the error of "too many open files".

```Bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ systemctl start sshd # Enable port 22

### Other Configuration

1. Disable the system swap memory
1. Reduce the system swap priority to the lowest level

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -159,7 +159,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# Make the configuration take effect without restarting.
sysctl -p
# Check memory allocation, expecting swap to be 0
# Swap's used memory has become 0
free -m
```
2. Set the maximum number of open files to 65535 to avoid the error of "too many open files".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口

### 其他配置

1. 关闭系统 swap 内存
1. 将系统 swap 优先级降至最低

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# 在不重启的情况下使配置生效。
sysctl -p
# 检查内存分配,预期 swap 为 0
# swap的已使用内存变为0
free -m
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口

### 其他配置

1. 关闭系统 swap 内存
1. 将系统 swap 优先级降至最低

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# 在不重启的情况下使配置生效。
sysctl -p
# 检查内存分配,预期 swap 为 0
# swap的已使用内存变为0
free -m
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ systemctl start sshd #启用22号端口

### 其他配置

1. 关闭系统 swap 内存
1. 将系统 swap 优先级降至最低

```Bash
echo "vm.swappiness = 0">> /etc/sysctl.conf
Expand All @@ -171,7 +171,7 @@ echo "vm.swappiness = 0">> /etc/sysctl.conf
swapoff -a && swapon -a
# 在不重启的情况下使配置生效。
sysctl -p
# 检查内存分配,预期 swap 为 0
# swap的已使用内存变为0
free -m
```

Expand Down
Loading