Results 1 to 11 of 11

Thread: why Icegrid very slow?

  1. #1
    ChenQingQing is offline Registered User
    Join Date
    May 2006
    Posts
    27

    Unhappy why Icegrid very slow?

    /* this is the following code. It runs well but very slow. any suggestion?

    */

    public Identity getDefaultObjectByServerId(String s){
    try{
    ServerInfo sInfo = getAdminPrx().getServerInfo(s); //getAdminPrx() return IceGrid.AdminPrx

    AdapterDescriptor adapter= (AdapterDescriptor)sInfo.descriptor.adapters.get(0 );

    for (Object object : adapter.objects) {
    ObjectDescriptor obj = (ObjectDescriptor)object;
    if (obj.type.equals("management::Manageable")){
    return obj.id;
    }
    }
    }
    catch(ServerNotExistException e){
    log.error("cannot reach server " + s + " :" + e.toString());
    }
    return null;
    }

  2. #2
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Welcome to the forums! Before we look into your issue, could you please set your signature as described in this thread?

    Thanks!

    Benoit.

  3. #3
    ChenQingQing is offline Registered User
    Join Date
    May 2006
    Posts
    27
    I have done that now, I think
    QingQing Chen

    BeiJing Gaov Visual Tech Co., Ltd.

    Mysee.com

    Internal Administration Project

  4. #4
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    I'm afraid it's impossible to say without more information what could be the reason or if this is expected at all. How long does this code take to execute? What kind of machine are you using for the icegridregistry? Could you post the application descriptor here?

    Thanks,

    Benoit.

  5. #5
    ChenQingQing is offline Registered User
    Join Date
    May 2006
    Posts
    27
    we are doing a web based application. It seems to take 30 or even more seconds to initialize an Ice communication. I don't really know how to post "application descriptor " as which is an object I think. I may post some values which you think are important. Actually, we now have serveral applications named as "CN, CT, EC, ET, SMS, SPS and DUMMY". we use the following code to add new application in web page. Is it suitable?

    // Basically we set all the attribute to empty except for name when creating node and application
    ApplicationDescriptor app = new ApplicationDescriptor();
    app.name = name;
    app.variables = new TreeMap();
    app.replicaGroups = new LinkedList();
    app.serverTemplates = new TreeMap();
    app.serviceTemplates = new TreeMap();
    app.nodes = new TreeMap();
    app.distrib = new DistributionDescriptor();

    app.description = description;
    try{
    adminPrx.addApplication(app); //adminPrx is IceGrid.AdminPrx
    }
    catch(Exception e){
    throw new RuntimeException(e);
    }
    QingQing Chen

    BeiJing Gaov Visual Tech Co., Ltd.

    Mysee.com

    Internal Administration Project

  6. #6
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Ok, so you create the application descriptors programatically (you don't load them from an XML file). Is there many servers declared in each application? From the code you posted, it looks like the application descriptors are mostly empty, right?

    I'm afraid it's still impossible to say what could be wrong. Are you sure Ice/IceGrid is responsible for the slow response time? Could you add timing information to your code around the call to "ServerInfo sInfo = getAdminPrx().getServerInfo(s)" to see how long it takes?

    Please also provide the Ice version, the operating system and and kind of hardware you're using. If you could also provide a simple self compilable test case that demonstrate the problem, I'll be happy to look at it.

    Cheers,
    Benoit.

  7. #7
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Btw, this might also be some kind of network issue. You could try to turn network tracing on with the Ice.Trace.Network property (set to 2) to see if it can give you some clues.

    Benoit.

  8. #8
    vsonnathi is offline Registered User
    Name: Venkat Ramana
    Organization: Amazon.com
    Project: Prototype
    Join Date
    May 2004
    Posts
    39
    I did notice this behavior once and the machine on which the Servant was running had two IP addresses and one of them was not accessible from the Client so Ice Runtime had to timeout and then try the other end point to get the response.

    HTH.

    Regards,
    --Venkat.

    Quote Originally Posted by ChenQingQing
    /* this is the following code. It runs well but very slow. any suggestion?

    */

    public Identity getDefaultObjectByServerId(String s){
    try{
    ServerInfo sInfo = getAdminPrx().getServerInfo(s); //getAdminPrx() return IceGrid.AdminPrx

    AdapterDescriptor adapter= (AdapterDescriptor)sInfo.descriptor.adapters.get(0 );

    for (Object object : adapter.objects) {
    ObjectDescriptor obj = (ObjectDescriptor)object;
    if (obj.type.equals("management::Manageable")){
    return obj.id;
    }
    }
    }
    catch(ServerNotExistException e){
    log.error("cannot reach server " + s + " :" + e.toString());
    }
    return null;
    }

  9. #9
    ChenQingQing is offline Registered User
    Join Date
    May 2006
    Posts
    27
    The registery machine runs VMware which create two virtural IP address.
    QingQing Chen

    BeiJing Gaov Visual Tech Co., Ltd.

    Mysee.com

    Internal Administration Project

  10. #10
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Did you find the solution to your problem?

    The most likely reason is that Ice tries to contact the VMware virtual IP addresses and this takes some time if the VMware virtual machines are not running. If you run your client with Ice.Trace.Network=2, you should see if that's the case. You should configure IceGrid to only listen on a specific interface (it listens on all network interfaces by default), for example with the configuration properties below, IceGrid will only listen on the interface with the IP address 192.168.0.5.

    Code:
    IceGrid.Registry.Client.Endpoints=default -p 12000 -h 192.168.0.5
    IceGrid.Registry.Server.Endpoints=default -h 192.168.0.5
    IceGrid.Registry.Internal.Endpoints=default -h 192.168.0.5
    IceGrid.Registry.Admin.Endpoints=default -h 192.168.0.5
    Hope this helps.

    Cheers,
    Benoit.

  11. #11
    ChenQingQing is offline Registered User
    Join Date
    May 2006
    Posts
    27

    Now it works quickly

    Now it works quickly. it should be that the VMware makes the problems.

    Thanks a lot!
    QingQing Chen

    BeiJing Gaov Visual Tech Co., Ltd.

    Mysee.com

    Internal Administration Project

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. IcePatch2 on IceGrid is very very slow.
    By leojay in forum Help Center
    Replies: 7
    Last Post: 08-11-2009, 06:57 AM
  2. Application add is very slow, what happened?
    By eaglecn in forum Help Center
    Replies: 9
    Last Post: 01-13-2009, 06:10 AM
  3. Slow Connections
    By bigtim in forum Help Center
    Replies: 4
    Last Post: 10-05-2007, 12:15 PM
  4. Slow callback sample
    By burghboy in forum Help Center
    Replies: 7
    Last Post: 02-02-2007, 08:43 AM
  5. Why concurrent access to FreezeMap is so slow?
    By kingbo in forum Help Center
    Replies: 4
    Last Post: 05-27-2006, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •