Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 05-16-2006
ChenQingQing 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;
}
Reply With Quote
  #2 (permalink)  
Old 05-16-2006
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
Hi,

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

Thanks!

Benoit.
Reply With Quote
  #3 (permalink)  
Old 05-17-2006
ChenQingQing 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
Reply With Quote
  #4 (permalink)  
Old 05-17-2006
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
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.
Reply With Quote
  #5 (permalink)  
Old 05-18-2006
ChenQingQing 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
Reply With Quote
  #6 (permalink)  
Old 05-18-2006
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
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.
Reply With Quote
  #7 (permalink)  
Old 05-18-2006
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
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.
Reply With Quote
  #8 (permalink)  
Old 05-22-2006
vsonnathi 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;
}
Reply With Quote
  #9 (permalink)  
Old 05-23-2006
ChenQingQing 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
Reply With Quote
  #10 (permalink)  
Old 05-23-2006
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,564
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.
Reply With Quote
  #11 (permalink)  
Old 05-26-2006
ChenQingQing 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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow in Freeze Evictor add operation Yunqiao Yin Help Center 2 02-06-2007 08:38 PM
Slow callback sample burghboy Help Center 7 02-02-2007 09:43 AM
Why concurrent access to FreezeMap is so slow? kingbo Help Center 4 05-27-2006 01:06 AM


All times are GMT -4. The time now is 11:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.