JxioConnection Inputstream and Outputstream - accelio/JXIO GitHub Wiki

Read JxioConnection Explained for more details.

Clients connect to a multi-threaded server and send or recieve data.

This example is also used as the main JxioConnection benchmark tool.

The example below demonstrates a scenario where 2 clients - 1 input and 1 output, connect to the server on the IP 36.0.0.149. Input client requests 10GB of data from the server, and output client sends to the server 10GB of data.

The results on our test machine where:

  • output stream BW[MB/s]: 3961.7886
  • input stream BW[MB/s]: 3890.3313

Benchmark test on client side

$ ./runJxioConnectionTest.sh c 36.0.0.149 4611 2 10000000000 1 1  
Compiling JAVA files....  
running InputStream Benchmark
java: no process killed
2014-07-07 18:03:15,886 Thread-0 INFO  JxioConnection:46 [jxioConnection[input StreamClient_0](/accelio/JXIO/wiki/input-StreamClient_0)]    36.0.0.149 port 4611
2014-07-07 18:03:15,886 Thread-1 INFO  JxioConnection:46 [jxioConnection[output StreamClient_0](/accelio/JXIO/wiki/output-StreamClient_0)] 36.0.0.149 port 4611
2014-07-07 18:03:15,889 Thread-0 INFO  StreamClient:56 [input StreamClient_0] going to read 10000000000
2014-07-07 18:03:15,890 Thread-1 INFO  StreamClient:66 [output StreamClient_0] going to write 10000000000
2014-07-07 18:03:16,018 Thread-1 INFO  SimpleConnection:40 jxio.CS[7fe814019d90] session established with host 36.0.0.149, time taken to open: 124673959
2014-07-07 18:03:16,018 Thread-0 INFO  SimpleConnection:40 jxio.CS[7fe81003dd40] session established with   host 36.0.0.149, time taken to open: 124956288
2014-07-07 18:03:16,019 Thread-1 INFO  JxioConnection:136 OSConnection[jxio.CS[7fe814019d90]] created
2014-07-07 18:03:16,021 Thread-0 INFO  JxioConnection:86 ISConnection[jxio.CS[7fe81003dd40]] created
2014-07-07 18:03:18,405 Thread-1 INFO  StreamClient:78 [output StreamClient_0] Time to transfer data in nano: 2524112530
2014-07-07 18:03:18,407 Thread-1 INFO  StreamClient:81 [output StreamClient_0] [----------------  BW[MB/s]: 3961.7886 ----------------]
2014-07-07 18:03:18,408 Thread-1 INFO  JxioConnection:67 jxioConnection[output StreamClient_0](/accelio/JXIO/wiki/output-StreamClient_0) disconnecting
2014-07-07 18:03:18,423 Thread-1 INFO  SimpleConnection:58 OSConnection[jxio.CS[7fe814019d90]] onSessionEvent SESSION_CLOSED
2014-07-07 18:03:18,451 Thread-0 INFO  StreamClient:78 [input StreamClient_0] Time to transfer data in nano: 2570475064
2014-07-07 18:03:18,451 Thread-0 INFO  StreamClient:81 [input StreamClient_0] [----------------  BW[MB/s]: 3890.3313 ----------------]
2014-07-07 18:03:18,452 Thread-0 INFO  JxioConnection:67 jxioConnection[input StreamClient_0](/accelio/JXIO/wiki/input-StreamClient_0) disconnecting
2014-07-07 18:03:18,453 Thread-0 INFO  SimpleConnection:58 ISConnection[jxio.CS[7fe81003dd40]] onSessionEvent SESSION_CLOSED

Benchmark test on server side:

$ ./runJxioConnectionTest.sh s 36.0.0.149 4611 2 10000000000 1 1  
Compiling JAVA files....  
running InputStream Benchmark
2014-07-07 18:03:09,666 main INFO  ServerWorker:84 [ServerWorker 1 ] is up and waiting for requests
2014-07-07 18:03:09,681 main INFO  ServerWorker:84 [ServerWorker 2 ] is up and waiting for requests
2014-07-07 18:03:09,681 main INFO  JxioConnectionServer:58 [JxioConnectionServer jxio.SP[7f301410eec0] ] JxioConnectionServer started, host 36.0.0.149 listening on port 4611, numWorkers 2
2014-07-07 18:03:09,685 Thread-1 INFO  ServerWorker:93 [ServerWorker 1 ] waiting for a new connection
2014-07-07 18:03:09,686 Thread-2 INFO  ServerWorker:93 [ServerWorker 2 ] waiting for a new connection
2014-07-07 18:03:15,987 Thread-0 INFO  JxioConnectionServer:135 [JxioConnectionServer jxio.SP[7f301410eec0] ] Server worker number 1 got new session
2014-07-07 18:03:15,995 Thread-0 INFO  JxioConnectionServer:135 [JxioConnectionServer jxio.SP[7f301410eec0] ] Server worker number 2 got new session
2014-07-07 18:03:16,022 Thread-2 INFO  UserServerCallbacks:20 [ServerWorker 2 ] going to send 10000000000 bytes
2014-07-07 18:03:16,023 Thread-1 INFO  UserServerCallbacks:39 [ServerWorker 1 ] going to read 10000000000 bytes
2014-07-07 18:03:18,410 Thread-1 INFO  ServerWorker:198 [ServerWorker 1 ] closing session sent 152588 msgs
2014-07-07 18:03:18,417 Thread-1 INFO  ServerWorker:220 [ServerWorker 1 ] got event SESSION_CLOSED, the reason is SUCCESS
2014-07-07 18:03:18,418 Thread-1 INFO  ServerWorker:144 [ServerWorker 1 ] disconnected from a Session
2014-07-07 18:03:18,419 Thread-1 INFO  ServerWorker:93 [ServerWorker 1 ] waiting for a new connection
2014-07-07 18:03:18,451 Thread-2 INFO  ServerWorker:198 [ServerWorker 2 ] closing session sent 152588 msgs
2014-07-07 18:03:18,455 Thread-2 INFO  ServerWorker:220 [ServerWorker 2 ] got event SESSION_CLOSED, the reason is SESSION_DISCONNECTED
2014-07-07 18:03:18,456 Thread-2 INFO  ServerWorker:144 [ServerWorker 2 ] disconnected from a Session
2014-07-07 18:03:18,456 Thread-2 INFO  ServerWorker:93 [ServerWorker 2 ] waiting for a new connection