Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux --- process handle limit summary     - Java abstract class instantiation (Programming)

- Ubuntu 15.04 and CentOS 7 to deploy .NET, Mono and DNX (Server)

- Json data with double backslashes to a single backslash Json data processing (Programming)

- Learning MySQL data types (Database)

- Java singleton mode (Singleton mode) (Programming)

- Java 8 Lambda principle analysis (Programming)

- CentOS6.5 setup Oracle 11gR2 startup (Database)

- Linux-based Heartbeat high availability configuration httpd service (Server)

- Spring WebSocket Comments (Programming)

- shellinabox: one uses AJAX Web-based terminal emulator (Linux)

- CentOS7 install JAVA notes (Linux)

- CentOS 6.5 three ways to configure the IP address (Linux)

- Linux Getting Started Tutorial: How to set up a static MAC address on VMware ESXi virtual machine (Mobile)

- 12 Linux Process Management Commands (Linux)

- Briefly explain the invasion of the four-level denial of service attack DoS Linux server (Linux)

- PostgreSQL log classification and management (Database)

- Linux permissions Detailed (Linux)

- Ubuntu 14.04 running ASP.NET Configuration Mono + Jexus (Server)

- Sublime Text Add instructions to insert the current time zone (Linux)

- Fedora 20 Installation and Configuration (Linux)

 
         
  Linux --- process handle limit summary
     
  Add Date : 2018-11-21      
         
         
         
  Many online posts that influence has been that Unix, Linux under a single process opens a handle cap number is 65535 and can not exceed this value, most recently from the Internet, another description in SUSE, RedHat have tested that can support a single process 100 million or more handles.

About file system handles several restrictions from big to small arrangement:

/ Proc / sys / fs / nr_open

The total number of system file system supports file handle limit, the default value 1048576 (1M), Linux2.6.25 began to increase the kernel parameter is used to replace the kernel macro NR_OPEN (1048576), the upper limit value is limited by system memory.

In linux 2.26.32 platform to perform "man 5 proc" do not see the "/ proc / sys / fs / nr_open", only to see NR_OPEN parameter limits the / proc / sys / fs / file-max.

/ Proc / sys / fs / file-max

The total number of file system supports file systems handle maximum must be less than / proc / sys / fs / nr_open or NR_OPEN, increases the value must be synchronized modify / proc / sys / fs / inode-max = 4 * / proc / sys / fs / file-max.

ulimit -Hn

Handles single process hard limit, the default value of 1024, can not be greater than / proc / sys / fs / file-max, modification method is not much to say.

ulimit -Hn

Soft cap the number of handles a single process, the default value of 1024 can not exceed "ulimit -Hn" hard cap modification method is not much to say.

FD_SETSIZE

Linux environment a C language macro definition in /usr/include/bits/typesize.h or defined, the default value of 1024, so far, I can only confirm that the macro definition of the limits FD_SET (), file FD_CLR () operation description character values, guess should be a limit earlier version of Linux legacy. Now select () operation has been eliminated, the macro definition should also useless. If you want to use select () series of operations can be defined in gcc when compiling the macro "-DFD_SETSIZE = 65535".

Manually modify the operating system handle, modify the configuration according to the following table:

operating system

See handle several methods

Modify handles several methods

Linux

ulimit -Sn

--- Check the soft limit for the number of handles

ulimit -Hn

--- Check the number of handles hard limit

Check /etc/security/limits.conf file, modify or add the following configuration:

* Hard nofile 65536

* Soft nofile 65535

Add the following configuration file in /etc/pam.d/su,/etc/pam.d/xdm,/etc/pam.d/login:

session required pam_limits.so

HP

kctune -q maxfiles

--- Check the soft limit for the number of handles

kctune -q maxfiles_lim

--- Check the number of handles hard limit

Run Review:

kctune maxfiles> = XXX

XXX range [32, maxfiles_lim] in the range, maxfiles_lim the [] 32,1048576, but greater than 65535, some older versions of the file functions are not compatible.

After maxfiles modification, you must restart the operating system to take effect.

Aix

ulimit -Sn

--- Check the soft limit for the number of handles

ulimit -Hn

--- Check the number of handles hard limit

Check the / etc / security / limits file, and add to modify the following configuration:

nofiles = -1

nofiles_hard = -1

In AIX6 test verification: Even configured ulimited, a single process can only open 65535 handle.

Solaris

ulimit -Sn

--- Check the soft limit for the number of handles

ulimit -Hn

--- Check the number of handles hard limit

Check the / etc / system file, and add modify the following configuration:

rlim_fd_max = 65535

rlim_fd_cur = 65535

After modification, you need to reboot to take effect.
     
         
         
         
  More:      
 
- Spark read more HBase tables a RDD (Server)
- File sharing and fork function (Programming)
- Ubuntu install video conversion tool Selene (Linux)
- Linux find command detailing (Linux)
- Java Set and List in the relationship and difference (Programming)
- CentOS achieve trash mechanism (Linux)
- Getting Started with Linux system to learn: how to install the kernel headers on Linux (Linux)
- Installation image conversion tool on your Ubuntu Converseen 0.8.1 (Linux)
- Ubuntu 14.04 build Gitlab (Linux)
- The Rabbitmq installation under CentOS 6.4 (Linux)
- Tecplot Installation under Linux (Linux)
- Examples of testing and installation Mesos on CentOS (Linux)
- How to understand the difference between synchronous and asynchronous non-blocking blocking (Programming)
- Java Virtual Machine Basics (Programming)
- Use in Linux ipmitool tool (Linux)
- How to configure a server in a MySQL Cluster (Database)
- Teach you how to choose to install CentOS 6.5 installation package (Linux)
- High-performance JavaScript DOM programming (Programming)
- Ubuntu System Log Configuration / var / log / messages (Linux)
- MongoDB version 3.2 WiredTiger storage engine performance tests (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.