Modify ulimit optimization server

Source: Internet
Author: User
Modify the ulimit optimization server. by default, the file descriptor of the linux system is 1024. in the case of heavy load, this file descriptor is far from enough. The following two methods are available: 1, run the ulimit command to modify and display the current file descriptor ulimit-n. modify the file descriptor in the current user environment to modify the ulimit. the default file descriptor on the linux server is 1024, this file descriptor is far from enough in the case of heavy load. the following two methods are available: 1, use the ulimit command to modify # display the current file descriptor ulimit-n # Modify the file descriptor of the current user environment to 65536 ulimit-HSn 65536. only the file descriptor of the current user environment can be modified, if this user opens another connection, the file descriptor of the link environment is still unchanged. If the system is restarted, previous changes will not take effect. 2. modify limits. conf file 1. open/etc/security/limits. conf, which contains detailed comments. find the following settings (insert if not) * soft nofile 65536 * hard nofile 65536 2. edit/etc/pam. d/common-session: add a session required pam_limits.s3. edit/etc/profile and add ulimit-SHn 65536

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.