Results 1 to 5 of 5

Thread: ICE C++ slow transfer

  1. #1
    mariusola is offline Registered User
    Name: marius olaru
    Organization: Personal
    Project: student project
    Join Date
    Jul 2011
    Posts
    2

    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(bas e);



    // 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

  2. #2
    cnhome is offline Registered User
    Name: Li Wenzhi
    Organization: FreeLaner
    Project: Train Enquiries for Android
    Join Date
    Apr 2005
    Location
    Beijing, China
    Posts
    64
    two choice:

    1.increasing max message size:

    refrence:Ice message size settings
    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

  3. #3
    bernard's Avatar
    bernard is online now ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    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
    Bernard Normier
    ZeroC, Inc.

  4. #4
    mariusola is offline Registered User
    Name: marius olaru
    Organization: Personal
    Project: student project
    Join Date
    Jul 2011
    Posts
    2
    My application works (it doesn't generate MemoryLimitException). Indeed,
    increasing the value fo Ice.MessageSizeMax doesn't improve performance.

    Regards,
    Marius

  5. #5
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. use ice to transfer large files
    By walli in forum Help Center
    Replies: 1
    Last Post: 04-27-2009, 10:03 PM
  2. transfer file with Ice
    By zhongshiz in forum Help Center
    Replies: 4
    Last Post: 10-23-2007, 09:00 PM
  3. Slow Connections
    By bigtim in forum Help Center
    Replies: 4
    Last Post: 10-05-2007, 12:15 PM
  4. Can i use ice to transfer files between computers?
    By minifat in forum Help Center
    Replies: 2
    Last Post: 12-10-2004, 07:59 AM
  5. The right way to transfer raw bytes with ICE
    By catalin in forum Help Center
    Replies: 1
    Last Post: 12-05-2003, 10:10 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
  •