Opened 8 years ago

Closed 8 years ago

#1499 closed defect (wontfix)

Slow database-connection from Java

Reported by: anasiri Owned by: Dimitar Misev
Priority: minor Milestone: 9.4
Component: java Version: development
Keywords: Cc: Bang Pham Huu, Vlad Merticariu, Peter Baumann
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 years ago.
Creates the test-data
ReadData.sh (186 bytes ) - added by anasiri 8 years ago.
Reads the data using rasql
ReadData.java (1.8 KB ) - added by anasiri 8 years ago.
Reads the same date using Java
TestConnect.java (1005 bytes ) - added by anasiri 8 years ago.
Sample program, which only makes a connection to the database.
TestConnection.java (3.4 KB ) - added by Dimitar Misev 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by anasiri, 8 years ago

Description: modified (diff)

by anasiri, 8 years ago

Attachment: MemFill.sh added

Creates the test-data

by anasiri, 8 years ago

Attachment: ReadData.sh added

Reads the data using rasql

by anasiri, 8 years ago

Attachment: ReadData.java added

Reads the same date using Java

by anasiri, 8 years ago

Attachment: TestConnect.java added

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

comment:2 by anasiri, 8 years ago

Description: modified (diff)

comment:3 by Dimitar Misev, 8 years ago

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

comment:4 by Dimitar Misev, 8 years ago

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
----------------------------------------------------
Version 0, edited 8 years ago by Dimitar Misev (next)

by Dimitar Misev, 8 years ago

Attachment: TestConnection.java added

comment:5 by Dimitar Misev, 8 years ago

Cc: Bang Pham Huu Vlad Merticariu Peter Baumann added
Milestone: 9.4
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.