Archived

This forum has been archived. Please start a new discussion on GitHub.

connection setup time

Hi,

I am currently trying to get some performance testing values for a system built on ice. I am trying to get the time it takes to transfer a large object through ice as a parameter, the first time the method is called there is a long delay (as it sets up the connection) and subsequent calls are considerably shorter.

The problem is i want all these calls to include connection setup so they should give a similar timing value. I have made sure to connectionCached(false) and locatorCacheTimeout(0) but the first call is still taking up to 10seconds while subsequent calls are about 1sec. Can you offer any insight into what could be causing these dramatic differences, and is there anyway to turn it off?

Thanks for any help you can offer

Comments

  • The first call will take a little longer, yes, but not 10 seconds. (More likely a second or, on a LAN, a fraction of a second.)

    The most common cause for long connection delays are misconfigured DSN servers or endpoints in proxies that point at firewalled addresses. Do you have more than one endpoint in your proxy? If so, it's possible that the run time first tries one dysfunctional endpoint and then uses the other endpoint to connect once the first attempt has timed out.

    The easiest way to figure out what is going wrong is to run your client and server with --Ice.Trace.Network=2 and see what sort of trace you get. That will likely help isolate the problem.

    Cheers,

    Michi.
  • marc
    marc Florida
    Note that disabling connection caching doesn't disable connection reuse. What connection caching does is that if there are multiple endpoints, and connections to some of these endpoints do already exist, such endpoints with existing connections are preferred. For more info on connection caching, please have a look at the article "Connection Management in Ice" in issue 24 of Connections.

    If you want a newly established connection for every call (why?), then close the connection after every call by using proxy->ice_getConnection()->close(false).
  • Thanks for your replies

    It would appear that ice is trying a dysfunctional endpoint first, is there anyway to force it to always bypass that endpoint?
  • marc
    marc Florida
    Greenhippo wrote: »
    Thanks for your replies

    It would appear that ice is trying a dysfunctional endpoint first, is there anyway to force it to always bypass that endpoint?

    Ice cannot know whether an endpoint is dysfunctional before it has tried to connect to such endpoint. If an endpoint is dysfunctional, the server shouldn't publish it.