Archived

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

ICE C++ slow transfer

Hi all,

I have some problems when trying to transfer large amount of data between a client and server application. It is too slow. For example when I'm trying to transfer an object that contains a vector of doubles with 25000 elements the transfer time is 21 seconds. I think there is a problem with the configuration but I'm not sure. Maybe someone can help me.

// The client code
Ice::CommunicatorPtr ic;
Ice::InitializationData idICE;
idICE.properties = Ice::createProperties();
idICE.properties->setProperty("Ice.MessageSizeMax", "5000");
ic = Ice::initialize(argc, argv, idICE);
// obtain a proxy for the remote object
Ice::ObjectPrx base = ic->stringToProxy("Data:tcp -p 10000");
entryPoint = EntryPointDataEventRecieverValPrx::checkedCast(base);



// The server code
Ice::CommunicatorPtr ic;
Ice::InitializationData id;
id.properties = Ice::createProperties();
id.properties->setProperty("Ice.MessageSizeMax", "5000");
ic = Ice::initialize(argc, argv, id);
Ice::ObjectAdapterPtr adapter = ic->createObjectAdapterWithEndpoints("DataAdapter", "tcp -p 10000");

Ice::ObjectPtr object = new DataEventI;
adapter->add(object, ic->stringToIdentity("Data"));
adapter->activate();
ic->waitForShutdown();



Best regards,
Marius

Comments

  • two choice:

    1.increasing max message size:

    refrence:http://www.zeroc.com/forums/help-center/3855-ice-message-size-settings.html
    refrence:Why does Ice limit the size of a request? - ZeroC Documentation - ZeroC

    2.you maybe use stream to transfer object more better.

    refrence:Streaming Interfaces
  • bernard
    bernard Jupiter, FL
    Ice.MessageSizeMax is really a security feature (ensures the 'other side' does not make your application allocate a very large buffer and indirectly make your application run out of memory).

    So, if your application works (it does not raise MemoryLimitException), increasing Ice.MessageSizeMax will not improve performance.

    Cheers,
    Bernard
  • My application works (it doesn't generate MemoryLimitException). Indeed,
    increasing the value fo Ice.MessageSizeMax doesn't improve performance.

    Regards,
    Marius
  • You should switch on Network Tracing to see how much data is really transferred, and whether really the transfer takes so long or perhaps something else, such as host name resolution.

    Also, while I don't think that this is the reason for the slow transfer in this case, all performance measurements should be done with the optimized version of Ice, not with the debug built.