Opened 8 weeks ago

Closed 8 weeks ago

#1499 closed defect (wontfix)

Slow database-connection from Java

Reported by: anasiri Owned by: dmisev
Priority: minor Milestone: 9.4
Component: java Version: development
Keywords: Cc: bphamhuu, vmerticariu, pbaumann
Complexity: Medium

Description (last modified by anasiri)

Connecting from Java to rasdaman takes round about 2 seconds, while rasql has no such "delay".

Details here:
https://groups.google.com/forum/#!topic/rasdaman-users/tEGrPxI4C9o

Attachments (5)

MemFill.sh (1.2 KB) - added by anasiri 8 weeks ago.
Creates the test-data
ReadData.sh (186 bytes) - added by anasiri 8 weeks ago.
Reads the data using rasql
ReadData.java (1.8 KB) - added by anasiri 8 weeks ago.
Reads the same date using Java
TestConnect.java (1005 bytes) - added by anasiri 8 weeks ago.
Sample program, which only makes a connection to the database.
TestConnection.java (3.4 KB) - added by dmisev 8 weeks ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 weeks ago by anasiri

  • Description modified (diff)

Changed 8 weeks ago by anasiri

Creates the test-data

Changed 8 weeks ago by anasiri

Reads the data using rasql

Changed 8 weeks ago by anasiri

Reads the same date using Java

Changed 8 weeks ago by anasiri

Sample program, which only makes a connection to the database.

comment:2 Changed 8 weeks ago by anasiri

  • Description modified (diff)

comment:3 Changed 8 weeks ago by dmisev

I'm getting ~450ms on my machine, which still seems quite high nevertheless.

comment:4 Changed 8 weeks ago by dmisev

It's just the initial setup that takes a while. So for servers it should be no issue, for clients it's significant. Unfortunately I doubt we can improve much the "startup time", it's up to the network library we use.

Here are some measurements (I attached the code).

----------------------------------------------------
Starting test
Constructing RasImplementation: 19 ms
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$1 run
INFO: Created transport io.grpc.netty.NettyClientTransport@47f6473(localhost/127.0.0.1:7001) for localhost/127.0.0.1:7001
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$TransportListener transportReady
INFO: Transport io.grpc.netty.NettyClientTransport@47f6473(localhost/127.0.0.1:7001) for localhost/127.0.0.1:7001 is ready
Setting user identification: 347 ms
Creating Database: 0 ms
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$1 run
INFO: Created transport io.grpc.netty.NettyClientTransport@6b53e23f(blade/127.0.1.1:9000) for blade/127.0.1.1:9000
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$TransportListener transportReady
INFO: Transport io.grpc.netty.NettyClientTransport@6b53e23f(blade/127.0.1.1:9000) for blade/127.0.1.1:9000 is ready
Opening database: 80 ms

Creating Transaction 0: 0 ms
Begin Transaction 0: 3 ms
Commit Transaction 0: 14 ms

Creating Transaction 1: 0 ms
Begin Transaction 1: 8 ms
Commit Transaction 1: 18 ms

Creating Transaction 2: 0 ms
Begin Transaction 2: 9 ms
Commit Transaction 2: 16 ms

Creating Transaction 3: 0 ms
Begin Transaction 3: 6 ms
Commit Transaction 3: 15 ms

Creating Transaction 4: 0 ms
Begin Transaction 4: 6 ms
Commit Transaction 4: 14 ms

Creating Transaction 5: 0 ms
Begin Transaction 5: 6 ms
Commit Transaction 5: 14 ms

Creating Transaction 6: 0 ms
Begin Transaction 6: 5 ms
Commit Transaction 6: 14 ms

Creating Transaction 7: 0 ms
Begin Transaction 7: 5 ms
Commit Transaction 7: 15 ms

Creating Transaction 8: 0 ms
Begin Transaction 8: 7 ms
Commit Transaction 8: 16 ms

Creating Transaction 9: 0 ms
Begin Transaction 9: 7 ms
Commit Transaction 9: 16 ms
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$TransportListener transportShutdown
INFO: Transport io.grpc.netty.NettyClientTransport@47f6473(localhost/127.0.0.1:7001) for localhost/127.0.0.1:7001 is being shutdown
Mar 01, 2017 5:38:54 PM io.grpc.internal.TransportSet$TransportListener transportShutdown
INFO: Transport io.grpc.netty.NettyClientTransport@6b53e23f(blade/127.0.1.1:9000) for blade/127.0.1.1:9000 is being shutdown
Total elapsed time: 708 ms
Test finished
----------------------------------------------------
Last edited 8 weeks ago by dmisev (previous) (diff)

Changed 8 weeks ago by dmisev

comment:5 Changed 8 weeks ago by dmisev

  • Cc bphamhuu vmerticariu pbaumann added
  • Milestone set to 9.4
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.