Home > other >  The maximum number of connections TCP/IP
The maximum number of connections TCP/IP

Time:10-08

The great god give a solution, I want to know how to calculate the maximum number of connections TCP/IP

CodePudding user response:

The maximum number of file handles according to your system Settings, can be configured

CodePudding user response:

System configuration, Linux by ulimit -n view, by modifying the/etc/security/limits file modification

CodePudding user response:

refer to the second floor heyuhang112 response:
system configuration, Linux by ulimit -n view, by modifying the/etc/security/limits the conf file modification

This is the maximum number of files can open, but open the socket of the Linux is regarded as a open the file

CodePudding user response:

Under Linux Epoll mode by default only support 1024 connections, so we have to revise the Linux system can open the biggest descriptor limitation,

The simplest modification methods you can use the ulimit -n 3000 when a descriptor is modified to allow maximum 3000, but how to do it, only for the current command terminal open application effectively,

To once and for all, you have to modify the/etc/security/limits the conf configuration files,

Vim/etc/security/limits. Conf

In the file add

* soft nofiles 3000

* hard nofiles 20000

Save, restart the system, will take effect,

To explain the above command: * indicates the configuration for all users are effective

Soft said may be more than the back of the configuration for

Hard said maximum number of no more than the back of the configuration to

Nofiles said we this configuration is the descriptor configuration
  • Related