Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Need help resolving query latency
[CDO] Need help resolving query latency [message #1611782] Wed, 11 February 2015 16:07 Go to next message
Thomas Gerlitz is currently offline Thomas GerlitzFriend
Messages: 9
Registered: November 2013
Junior Member
Hello everybody,

we currently encounter some problems when executing queries from a client on a CDO server that is located in our local network. When executing arbitrary queries we experience latencies of approximatly 200ms, while executing the same queries on a server that is running on the same machine as the client only takes about 1-5ms. In both scenarios the database is located on the same machine as the server.

Does anyone of you have an idea where the packets might get stuck within the cdo/java stack and what can be done about it? Or are these query execution times considered normal when the packets go through the java tcp stack?

A few general information about our setup:
We are currently using CDO 4.3.0.v20140520-1823 and Java 1.8.0_31
Server and Client machines both run windows and firewalls are configured to allow communication on the cdo port.

To test general network latency we already performed a TCP latency test based on the powershell tool suite PSTools with 10000 iterations and a packet size of 50kB in our network and observed average roundtrip latencies of 5ms on packets send between the machines running the server and the client.

I have attached our cdo-server.xml and a minimal example which reproduces the latency in our setup.

Thank you in advance
Thomas Gerlitz

[Updated on: Wed, 11 February 2015 16:55]

Report message to a moderator

Re: [CDO] Need help resolving query latency [message #1611802 is a reply to message #1611782] Wed, 11 February 2015 16:19 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Thomas,

Yes it is a known issue when the DB and the CDO server are on different
machines. The technical reason is that CDO make many SQL queries to get
CDORevisions. It's for that we advice to have both DB and CDO servers on
a same machine.

Best Regards.

Le 11/02/2015 17:07, Thomas Gerlitz a écrit :
> Hello everybody,
>
> we currently encounter some problems when executing queries on a CDO server that is located in our local network. When executing arbitrary queries we experience latencies of approximatly 200ms, while executing the same queries on a server that is running on the same machine only takes about 1-5ms.
>
> Does anyone of you have an idea where the packets might get stuck within the cdo/java stack and what can be done about it? Or are these query execution times considered normal when the packets go through the java tcp stack?
>
> A few general information about our setup:
> We are currently using CDO 4.3.0.v20140520-1823 and Java 1.8.0_31
> Server and Client machines both run windows and firewalls are configured to allow communication on the cdo port.
>
> To test general network latency we already performed a TCP latency test based on the powershell tool suite PSTools with 10000 iterations and a packet size of 50kB in our network and observed average roundtrip latencies of 5ms on packets send between the machines running the server and the client.
>
> I have attached our cdo-server.xml and a minimal example which reproduces the latency in our setup.
>
> Thank you in advance
> Thomas Gerlitz
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Need help resolving query latency [message #1611825 is a reply to message #1611802] Wed, 11 February 2015 16:37 Go to previous messageGo to next message
Thomas Gerlitz is currently offline Thomas GerlitzFriend
Messages: 9
Registered: November 2013
Junior Member
Hello Esteban,

thank you for your reply. It seams that I have not described my setup correctly:
We are currently using hsqldb that is started directly by the cdo server. Latencies (>200ms) can be observed when I use two machines in our setup. One running the cdo client application and one running the cdo server and the database.

When we move all these components (client,server and db) on the same machine we do not observe the described latencies.

I have now corrected this in my first post.

I hope these clarifications help to understand my problem.

Best Regards

[Updated on: Wed, 11 February 2015 16:55]

Report message to a moderator

Re: [CDO] Need help resolving query latency [message #1613059 is a reply to message #1611782] Thu, 12 February 2015 11:29 Go to previous messageGo to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior Member
Hello! To fix this, you should patch TCPAcceptor class.
In handleAccept method, add additional option:

socketChannel.socket().setTcpNoDelay(true);


This should work.
Re: [CDO] Need help resolving query latency [message #1614397 is a reply to message #1613059] Fri, 13 February 2015 08:08 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Leonid and Thomas,

Interesting to know, looking at the CDO git history I see there was an
attempt to use this API for issue
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213748 .

Best Regards.

Le 12/02/2015 12:29, Leonid Ripeynih a écrit :
> Hello! To fix this, you should patch TCPAcceptor class.
> In handleAccept method, add additional option:
>
>
> socketChannel.socket().setTcpNoDelay(true);
>
>
> This should work.



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Need help resolving query latency [message #1614438 is a reply to message #1614397] Fri, 13 February 2015 08:45 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
In fact not, this bugzilla is about connection inactivity.

Le 13/02/2015 09:08, Esteban Dugueperoux a écrit :
> Hi Leonid and Thomas,
>
> Interesting to know, looking at the CDO git history I see there was an
> attempt to use this API for issue
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=213748 .
>
> Best Regards.
>
> Le 12/02/2015 12:29, Leonid Ripeynih a écrit :
>> Hello! To fix this, you should patch TCPAcceptor class.
>> In handleAccept method, add additional option:
>>
>>
>> socketChannel.socket().setTcpNoDelay(true);
>>
>>
>> This should work.
>
>
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: [CDO] Need help resolving query latency [message #1614459 is a reply to message #1611825] Fri, 13 February 2015 08:57 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6454
Registered: July 2009
Senior Member
Am 11.02.2015 um 17:37 schrieb Thomas Gerlitz:
> Hello Esteban,
>
> thank you for your reply. It seams that I have not described my setup correctly:
> We are currently using hsqldb that is started directly by the cdo server. Latencies (>200ms) can be observed when I
> use two machines in our setup.
I'd expect longer server round-trips if the server is not on the same machine. And 200ms sounds also reaonable to me. So
I'm not exactly sure about the problem. Am I missing something?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> One running the cdo client application and one running the cdo server and the database.
> When we move all these components (client,server and db) on the same machine we do not observe the described latencies.
>
> I hope these clarifications help to understand my problem.
>
> Best Regards
>


Re: [CDO] Need help resolving query latency [message #1614470 is a reply to message #1614397] Fri, 13 February 2015 09:06 Go to previous messageGo to next message
Thomas Gerlitz is currently offline Thomas GerlitzFriend
Messages: 9
Registered: November 2013
Junior Member
Hi Leonid and Esteban,

thank you for your replies. I tried the workaround that Leonid suggested and query execution times are now in the range of my initial setup (1-5ms).

Thank you very much for your help!

Best Regards
Re: [CDO] Need help resolving query latency [message #1614477 is a reply to message #1614470] Fri, 13 February 2015 09:10 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6454
Registered: July 2009
Senior Member
Am 13.02.2015 um 10:06 schrieb Thomas Gerlitz:
> Hi Leonid and Esteban,
>
> thank you for your replies. I tried the workaround that Leonid suggested and query execution times are now in the
> range of my initial setup (1-5ms).
That is interesting! Maybe you want to submit an enhancement request so that we can investigate how to make this
configurable...

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Need help resolving query latency [message #1614522 is a reply to message #1614477] Fri, 13 February 2015 09:51 Go to previous message
Thomas Gerlitz is currently offline Thomas GerlitzFriend
Messages: 9
Registered: November 2013
Junior Member
Hi Eike,

I have opened an enhancement request:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=459861

Best regards
Previous Topic:Custom Attributes to Enum
Next Topic:Generated Code - Autoboxing Warnings
Goto Forum:
  


Current Time: Sat Nov 23 02:04:31 GMT 2019

Powered by FUDForum. Page generated in 0.02381 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top