Ace Self-band examples Test_proactor performance under Windows, Solaris, Linux __linux

Source: Internet
Author: User

1, what is Ace (slightly)

2, what is Proactor (slightly)

3. Example:/ace_wrappers/examples/reactor/proactor/test_proactor

3.1. Operating Environment

172.16.34.11:winxp

172.16.33.34:linux (version slightly)

172.16.33.23:solaris (version slightly)

3.2, 34.11 as the server side, 33.34 as the client:

Server Side starts First:

D:/share/ace_server_code/ace_wrappers5.4/examples/reactor/proactor>test_proactor-d C:/test.txt

Client initiates send file:

[Jcwang@portal proactor]$./test_proactor-h 172.16.34.11-f README

(25795 | 1024) Ace_posix_aiocb_proactor::max Number of aios=1024

Handle_read_file called

********************

Bytes_to_read = 8192

Handle = 3

bytes_transfered = 2946

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 2946

Handle = 4

bytes_transfered = 2946

act = 0

Success = 1

Completion_key = 0

Error = 0

Server-side receive file data:

./test_proactor.cpp:122:receiver::open called

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 44

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 44

handle = 1776

bytes_transfered = 44

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 512

handle = 1776

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 512

handle = 1776

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 512

handle = 1776

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 512

handle = 1776

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 512

handle = 1776

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 512

Handle = 1796

bytes_transfered = 386

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_file called

********************

Bytes_to_write = 386

handle = 1776

bytes_transfered = 386

act = 0

Success = 1

Completion_key = 0

Error = 0

Server successfully received file:)

3.3, 33.23 as the server side, 34.11 as the client:

Server Side starts First:

$./test_proactor

(5907 | 1) Ace_posix_aiocb_proactor::max Number of aios=1024

Client initiates send:

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 512

Handle = 1924

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_transmit_file called

********************

Socket = 1924

File = 1804

Bytes_to_write = 0

Bytes_per_send = 0

Flags = 0

bytes_transfered = 3032

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 512

Handle = 1924

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 512

Handle = 1924

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 512

Handle = 1924

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 512

Handle = 1924

bytes_transfered = 512

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_file called

********************

Bytes_to_read = 512

handle = 1952

bytes_transfered = 384

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_write_stream called

********************

Bytes_to_write = 384

Handle = 1924

bytes_transfered = 384

act = 0

Success = 1

Completion_key = 0

Error = 0

Server side:

.. /.. /.. /.. /examples/reactor/proactor/test_proactor.cpp:85:receiver::open called

The client calls again to send. Server side:

Handle_read_stream called

********************

Bytes_to_read = 1024

Handle = 6

bytes_transfered = 1024

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

Handle_read_stream called

********************

Bytes_to_read = 1024

Handle = 6

bytes_transfered = 1024

act = 0

Success = 1

Completion_key = 0

Error = 0

********************

.. /.. /.. /.. /examples/reactor/proactor/test_proactor.cpp:85:receiver::open called

After several times:

Server side:

********************

.. /.. /.. /.. /examples/reactor/proactor/test_proactor.cpp:85:receiver::open called

Ace_posix_aiocb_proactor::d elete_result_aiocb_list

Number Pending aio=0

$ ls-all

Total 1898

DRWXRWXRWX 4 Gchen WAP 1024 Feb 12 15:04.

DRWXRWXRWX 9 Gchen WAP 12 11:23.

DRWXRWXRWX 2 Gchen wap 15:17. Deps

DRWXRWXRWX 2 Gchen WAP 15:17. Libs

-rw-rw-rw-1 gchen WAP 36761 11:23 Makefile

-rw-r--r--1 Jcwang WAP 0 Feb 16:39 output

Output is 0 and the file is not written: (

3.4, 33.34 as server side (slightly, because it is not supported)

4. Conclusion (only according to the phenomenon)

Windows has a good support for proactor, at least after the process, successfully received files from Linux, and new files to write data, Solaris from the screen also asynchronously received data, created a file, but did not write (unknown reason), Most puzzling is the client sent several times after Ace_posix_aiocb_proactor::d elete_result_aiocb_list

Number pending aio=0, which terminated, and then connected: Ace_sock_connector::connect: Due to the target machine actively rejected, unable to connect; Linux does not support, as the server unresponsive.

5. Application background

A previous concurrency server with the Proactor framework was running well on Windows as a service, and now wants to migrate to Linux or Solaris and the framework remains the same, with Proactor. But from the basic routine of the operation, it seems to need further analysis of the feasibility, but also to be supported by technology, resources are difficult to find. Find an ace QQ group, dozens of people still no one help me, look forward to.

Note:

Pend

[Pend]

Vi.

Pending

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.