UbuntuWEB server parameter optimization

Source: Internet
Author: User
First, the most important thing is to install 64-bit Ubuntu, so that the memory limit of a single process is gone. 1. file handle. The default value is 1024, and the value is changed to 65535. $ Sudovi/etc/security/limits. add the following two lines to the conf file: * softnofile65535 * hardnofile65536 restart the server first, the most important thing is to install 64-bit Ubuntu, so that the memory limit of a single process is gone.

1. file handle. The default value is 1024, and the value is changed to 65535.

$ Sudo vi/etc/security/limits. conf

Add the following two lines:

* Soft nofile 65535
* Hard nofile 65536



After the server is restarted,
$ Ulimit-n
65535

2. tomcat's JAVA_OPTS settings. if it is a 32-bit operating system, the maximum value can be set to 1 GB. in a 64-bit operating system, it can be set to a large value.

Add a line to tomcat/bin/catalina. sh:

JAVA_OPTS = "-Xms2g-Xmx4g-XX: PermSize = 1g-XX: MaxPermSize = 2g"

3. tomcat settings.


MaxThreads = "512" minSpareThreads = "50"/>


ConnectionTimeout = "20000"
RedirectPort = "8443" URIEncoding = "UTF-8"/>
 

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.