IBM Support

Increasing the maximum number of open files on the Linux host

Question & Answer


Question

How can I increase the maximum number of open files on the Linux host?

Answer

You can increase the maximum number of open files on the Linux host by setting a new value in the kernel variable file, /proc/sys/fs/file-max.
 
As the root user, enter the following command:
sysctl -w fs.file-max=262144

This command forces the limit to 262144 files which is four times the default setting. (The default setting is appropriate for many environments.)

To set this value to persist a host reboot, you must make the change in the /etc/sysctl.conf file. 
1. Log in as root or sudo to root user. 

2. Open the file using a text editor such as vi.
vi /etc/sysctl.conf

3. Append a configuration directive as follows:
fs.file-max = 262144


4. Save and close the file.

5. To make the change take effect, you must do one of the following:

  • Log out and then log back in
  • Or, run the following command:

sysctl -p


6. To verify your settings, run the following command:

cat /proc/sys/fs/file-max

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

NZ127173

Document Information

More support for:
IBM PureData System

Software version:
1.0.0

Document number:
461777

Modified date:
17 October 2019

UID

swg21569422