Extending File Descriptors
Purpose
Set the maximum number of files that can be opened to 102400. If only a maximum of 1024 files can be opened by the software during the test, the server performance will be affected.
Procedure
- Open the limits.conf file:
1vim /etc/security/limits.conf - Press i to enter the insert mode and add the following content to the file:
* soft nofile 102400 * hard nofile 102400
- The asterisk (*) indicates all users.
- hard indicates a strict setting. The preset value cannot be exceeded.
- soft indicates an alarm setting. The preset value can be exceeded, but an alarm is generated if it is exceeded.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart the server to make the file take effect.
Parent topic: OS Tuning