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

Performance Problem!

Hi everyone,
I've got a performance problem with ice. I used TCP connection to transfer my data which may be 0-100 MB in size. It is too slow via network(WinXP SP2, 100M LAN, It will take about 35 seconds To transfer 9MB data ).

I found that ICE runtime devided the data into packet of 64k in size on WIN32 platform. Here is the related source code of ICE runtime:

IceInternal::TcpTransceiver::Write(Buffer& buf, int timeout)
Buffer::Container::difference_type packsize =
static_cast<Buffer::Container::difference_type>(buf.end() - buf.i);

#ifdef _WIN32
//limit packet size to avoid performance problems on WIN32
if(packetsize > 64 * 1024)
packetsize = 64 * 1024;

I belive that too much network I/O times will cause this performance problem.
Is 64K the best value? Is there other ways to improve data transfer performance if I don't wanna modify these codes and recompile them?

Thanks very much.


  • P.S. ICE version 2.1.0
  • xdm
    xdm La Coruña, Spain

    Hi YingchunH

    I using Ice for seding large amounts of data in winXp2 and i never have perfomance issue.

    I my case perfomance is always limit for the speed that my computer can marshall data in an Ice::Byte never for network.

    Have you tested your code in other OS?
  • Hi xdm,
    Thanks for your quick response.
    I masked off those codes and recompiled, now it is much faster(20 times above) than before.
    I 've not tested my code in other OSs yet, and I think this problem won't happened on other platforms cause the code is just for windows.
    I used string (other than sequence<byte>) to marshall byte data and got no performance question.

    thank you.

  • benoit
    benoit Rennes, France
    Thanks for the report, we'll look into this!