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