Linux System limit Knowledge

Source: Internet
Author: User

1.limit restricts the use of resources by each shell process and its child processes. Each login, or each process?

For example, Ulimit-n 10240 can temporarily change the current session of the shell process file handle limit, after exiting the current window, limit recovery.

For each shell to take effect, add to the system startup script

You can also add the Ulimit-n command before the process starts the script

2. Modify /etc/security/limits to set user-level limits , including soft and hard limits

3.

/proc/sys/fs/file-max, you can set system-level limits

App: Modify network connection limit

1, modify the user process can open the number of files limit the maximum number of concurrent users of the system to the user a single process can open the amount of files limit this is because the system creates a socket handle for each TCP connection, and each socket handle is also a file handle. View process Open File descriptor/ Proc/1234/fd2. Modify the TCP parameter settings Net.ipv4.ip_local_port_range each TCP client connection consumes a unique local port number (this port number is in the system's local port number range limit), If an existing TCP client connection has filled all of the local port numbers, you cannot assign a local port number to the new TCP client connection at this point, so the system returns a failure in the Connect () call and sets the error message to "Can" assignrequested Address "

Linux System limit Knowledge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.