Essential Netty in Action "Netty Combat (Essence)" Reading notes one

Source: Internet
Author: User

NIO was originally the abbreviation for New input/output. However, the Java API has been around for a long time and it is no longer new.
Now commonly used abbreviations to represent nonblocking I/O (non-blocking I/O). On the other hand, the general (including the author) refers to blocking I/O
OIO or Old input/output. You may also encounter normal I/O.
We have shown an example of I/O blocking in Java. Figure 1.1 shows how the method must be extended to handle multiple connections: to each connection
Create a thread, some connections are idle! Obviously, the scalability of this approach will be limited by the number of threads that can be created in the JVM.

This scheme is acceptable when you have fewer connections in your app. when the concurrent connection exceeds 10000, the contextswitching (
context switch) overhead will be obvious. In addition, each thread has a default stack memory allocated for 128K and 1M
The space between. Considering that the overall memory and operating system need to handle 100,000 or more concurrent connection resources, it seems to be a
The ideal solution.

1 x 16G Notebooks:

Avalible:16 G * 1024x768 m/g = 16384 M
min:128 K (0.125 m)/thread * 10000 Thread = 1250 m
max:1024 K (1 M)/thread * 10000 Thread = 10000 M

Maximum memory, which occupies more than half of the available memory.

Essential Netty in action "Netty actual Combat (Essence)" Reading notes one

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.