Concurrency capability of asynchronous IO: The backlog configuration is important

Source: Internet
Author: User

When I was about to finish at noon today, I found a problem that was maddening.

A lite AIO application should theoretically be more concurrent than a full version of the AIO application (because the full version of the transaction is more complex) and tested on the same machine.

However, the test results show that the concurrency of the lite version is less than the full version of the AIO application.

It took one hours to finally find the reason: the original backlog was set differently.

About the backlog parameter description in Network programming:

http://dola.xinfan.org/?p=110

The relevant code for the Lite version:

int backlog = 100; Asynserverchannel.bind (New inetsocketaddress (port), backlog);

The full version of the relevant code:

int backlog = 200; Asynserverchannel.bind (New inetsocketaddress (port), backlog);

As you can see, the main backlog setting is not the same, resulting in a lite version of AIO than the full version of AIO is also lower.

After I set the backlog in the Lite AIO to 200 and then use AB (stress test), I can finally get a bit higher than the full version of Aio concurrency.

2013-01-12

Concurrency capability of asynchronous IO: The backlog configuration is important

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.