Tomcat Performance Optimization open NIO non-blocking mode

Source: Internet
Author: User

To find out,Tomcat supports three ways to receive requests: BIO, NIO, APR.

1:bio mode, blocking I/O operations use traditional Java I/O operations,TOMCAT7 The following versions are run in bio mode by default, because each request is created with a thread to handle, with a large thread overhead , cannot handle high concurrency scenarios, and has the lowest performance in three modes

The configuration is as follows (/conf/server.xml in the Tomcat installation directory):


Tomcat starts as follows and sees http-bio-8080 as the Bio mode:



The 2:nio method is a new I/O operation (i.e. the Java.nio package and its child packages) provided by Java SE 1.4 and subsequent versions, which is a buffer-based, and can provide non-blocking i/ o operational Java API, which has better concurrency performance than traditional I/O operations (bio). Tomcat version 8 and above default NIO mode

The configuration is as follows :


Tomcat starts as follows and sees http-nio-8080 as the NIO pattern:

Tomcat Performance Optimization open NIO non-blocking mode

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.