Home Help Center

Configuring IceStorm for subscribers/publishers over udp correctly

MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
Hi,

I am having trouble configuring IceStorm and the publishers and subscribers correctly to send the messages over udp.
It works with tcp.

I have started IceStorm with IceStorm.Publish.Endpoints=udp. Is that needed?

This is the publisher:
[COLOR=#000000] intmain(intargc,char*argv[])  
 {  
 Ice::CommunicatorPtrcommunicator;  
 communicator=Ice::initialize(argc,argv);  
 Ice::ObjectPrxobj=communicator->[I]stringToProxy[/I]("IceStorm/TopicManager");  
 IceStorm::TopicManagerPrxtopicManager=IceStorm::TopicManagerPrx::checkedCast(obj);  
 IceStorm::TopicPrxtopic;  
 while(!topic){  
 try{  
 topic=topicManager->retrieve("Weather");  
 }catch(constIceStorm::NoSuchTopic&){  
 try{  
 topic=topicManager->create("Weather");  
 }catch(constIceStorm::TopicExists&){  
 //Anotherclientcreatedthetopic.  
 }  
 }  
 }  
    
 Ice::ObjectPrxpub=topic->getPublisher()->ice_oneway();  
 Test::mytopicPrxmonitor=Test::mytopicPrx::uncheckedCast(pub);  
 while(true){  
 doubletime=IceUtil::Time::now().toMicroSecondsDouble();  
 monitor->reportTime(time);  
 std::cout<<time<<std::endl;  
 usleep(1000000);  
 }  
 }[/COLOR]


This is the receiver:
[COLOR=#000000] classMyTopicI:virtualpublicTest::mytopic{  
 public:  
    
 //mytopicinterface  
 public:  
 void[I]reportTime[/I](Ice::Doublet,constIce::Current&)  
 {  
 Ice::Doubletime=IceUtil::Time::now().toMicroSecondsDouble();  
 std::cout<<"t:"<<(time-t)<<std::endl;  
 }  
 };  
 typedefIceInternal::Handle<MyTopicI>MyTopicIPtr;  
    
 intmain(intargc,char*argv[])  
 {  
 Ice::CommunicatorPtrcommunicator;  
 communicator=Ice::initialize(argc,argv);  
 Ice::ObjectPrxobj=communicator->[I]stringToProxy[/I]("IceStorm/TopicManager");  
 IceStorm::TopicManagerPrxtopicManager=IceStorm::TopicManagerPrx::checkedCast(obj);  
    
 Ice::ObjectAdapterPtradapter=communicator->[I]createObjectAdapterWithEndpoints[/I]("MonitorAdapter","udp");  
    
 MyTopicIPtrmonitor=newMyTopicI;  
 Ice::ObjectPrxproxy=adapter->[I]addWithUUID[/I](monitor)->ice_oneway();  
 adapter->[I]activate[/I]();  
    
 IceStorm::TopicPrxtopic;  
 try{  
 topic=topicManager->retrieve("Weather");  
 IceStorm::QoSqos;  
 topic->subscribeAndGetPublisher(qos,proxy);  
 }  
 catch(constIceStorm::NoSuchTopic&){  
 //Error!Notopicfound!  
 std::cerr<<"notopicfound";  
 }  
    
 communicator->[I]waitForShutdown[/I]();  
    
 topic->unsubscribe(proxy);  
    
 }[/COLOR]

Where do I need to insert "udp" to let publisher and/or the subscriber use udp?

thanks
Mirko

Comments

  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    Hi,

    For your subscriber and publisher proxies you should be calling ice_datagram(), not ice_oneway().

    Regards
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    Great thanks, that works.

    Is it possible to have UDP and TCP publishers on the same IceStorm?
    The property IceStorm.Publish.Endpoints=udp seems to fix all publishers to udp.

  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    Now I encountered something strange:
    When using udp the publish rate is around 110k Hz on my pc and the receive rate is 22k Hz, so a lot is dropped, which is acceptable at that rate.
    When I now insert a sleep of 1ms into the publisher the publish rate of course goes down to around 1k Hz.
    But also the receive rate goes down, to 100Hz.

    Why could that be?

    Another strange thing:
    I am measuring they delay of the topic message.
    When using tcp the delay is around 0.5ms.
    When using udp the delay goes up to 12ms. And without a sleep in the sender it goes up to a few seconds.

    Edit: With UDP it is completely unexplainable to me.
    If I reset Ice completely and insert a 1000ms sleep it works for the first start of publisher and subscriber.
    When I restart both, the receiving rate goes down to 50 and the delays is a few seconds. Also there builds up a backlog from the publisher (of course, because the publisher publishes with 1k Hz but the receiver only gets the data at 50 Hz).
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Yes, it's possible to use both UDP and TCP for publishing, just specify [FONT=courier new, courier, monospace]IceStorm.Publish.Endpoints=udp,tcp[/FONT][FONT=arial, helvetica, sans-serif] for the publish endpoints.[/FONT]

    [FONT=arial, helvetica, sans-serif]Which Ice version do you use and on which platform? Do you have a small test case we could use to reproduce what you're observing?

    Cheers,
    Benoit.[/FONT]
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    benoit wrote: »
    Hi,

    Yes, it's possible to use both UDP and TCP for publishing, just specify [FONT=courier new, courier, monospace]IceStorm.Publish.Endpoints=udp,tcp[/FONT][FONT=arial, helvetica, sans-serif] for the publish endpoints.[/FONT]

    I did that, but then I get the following Exception for a tcp connection as well as for a udp: terminate called after throwing an instance of 'Ice::NoEndpointException'
    what(): Reference.cpp:1663: Ice::NoEndpointException:
    no suitable endpoint available for proxy `IceStorm/TopicManager -t -e 1.0'

    My version is Ice 3.5.0 and Ubuntu 13.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    benoit wrote: »

    [FONT=arial, helvetica, sans-serif]Which Ice version do you use and on which platform? Do you have a small test case we could use to reproduce what you're observing?

    Cheers,
    Benoit.[/FONT]

    My version is Ice 3.5.0 and Ubuntu 13.


    This is the code:
    Subscriber:
     [COLOR=#000000]class MyTopicI : virtual public Test::mytopic {[/COLOR]  
     [COLOR=#000000]public:[/COLOR]  
     [COLOR=#000000]    MyTopicI() :i(0){}[/COLOR]  
     [COLOR=#000000]    // mytopic interface[/COLOR]  
     [COLOR=#000000]public:[/COLOR]  
     [COLOR=#000000]    void [I]reportTime[/I](Ice::Double t, const Ice::Current &)[/COLOR]  
     [COLOR=#000000]    {[/COLOR]  
     [COLOR=#000000]        static IceUtil::Time start = IceUtil::Time::now();[/COLOR]  
     [COLOR=#000000]        Ice::Double time = IceUtil::Time::now().toMicroSecondsDouble();[/COLOR]  
     [COLOR=#000000]//        if (i % 100 == 0)[/COLOR]  
     [COLOR=#000000]        {[/COLOR]  
     [COLOR=#000000]            std::cout << i << " rate: " << i/(IceUtil::Time::now()-start).toSecondsDouble() << std::endl;[/COLOR]  
     [COLOR=#000000]            std::cout << "t: " << (time-t)/1000/1000 << std::endl;[/COLOR]  
     [COLOR=#000000]        }[/COLOR]  
     [COLOR=#000000]        i++;[/COLOR]  
     [COLOR=#000000]    }[/COLOR]  
     [COLOR=#000000]    int i;[/COLOR]  
     [COLOR=#000000]};[/COLOR]  
     [COLOR=#000000]typedef IceInternal::Handle<MyTopicI> MyTopicIPtr;[/COLOR]  
         
     [COLOR=#000000]int main(int argc, char* argv[])[/COLOR]  
     [COLOR=#000000]{[/COLOR]  
     [COLOR=#000000]    Ice::CommunicatorPtr communicator;[/COLOR]  
     [COLOR=#000000]    communicator = Ice::initialize(argc, argv);[/COLOR]  
     [COLOR=#000000]    Ice::ObjectPrx obj = communicator->[I]stringToProxy[/I]("IceStorm/TopicManager");[/COLOR]  
     [COLOR=#000000]    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(obj);[/COLOR]  
         
     [COLOR=#000000]    Ice::ObjectAdapterPtr adapter = communicator->[I]createObjectAdapterWithEndpoints[/I]("MonitorAdapter", "udp");[/COLOR]  
         
     [COLOR=#000000]    MyTopicIPtr monitor = new MyTopicI;[/COLOR]  
     [COLOR=#000000]    Ice::ObjectPrx proxy = adapter->[I]addWithUUID[/I](monitor)->ice_datagram();[/COLOR]  
     [COLOR=#000000]    adapter->[I]activate[/I]();[/COLOR]  
         
     [COLOR=#000000]    IceStorm::TopicPrx topic;[/COLOR]  
     [COLOR=#000000]    try {[/COLOR]  
     [COLOR=#000000]        topic = topicManager->retrieve("Weather");[/COLOR]  
     [COLOR=#000000]        IceStorm::QoS qos;[/COLOR]  
     [COLOR=#000000]        topic->subscribeAndGetPublisher(qos, proxy);[/COLOR]  
     [COLOR=#000000]    }[/COLOR]  
     [COLOR=#000000]    catch (const IceStorm::NoSuchTopic&) {[/COLOR]  
     [COLOR=#000000]        // Error! No topic found![/COLOR]  
     [COLOR=#000000]        std::cerr<< "no topic found";[/COLOR]  
     [COLOR=#000000]    }[/COLOR]  
         
     [COLOR=#000000]    communicator->[I]waitForShutdown[/I]();[/COLOR]  
         
     [COLOR=#000000]    topic->unsubscribe(proxy);[/COLOR]  
         
     [COLOR=#000000]}[/COLOR]  
    
    Publisher:
      
     [COLOR=#000000]int main(int argc, char* argv[])[/COLOR]  
     [COLOR=#000000]{[/COLOR]  
     [COLOR=#000000]    Ice::CommunicatorPtr communicator;[/COLOR]  
     [COLOR=#000000]    communicator = Ice::initialize(argc, argv);[/COLOR]  
     [COLOR=#000000]    Ice::ObjectPrx obj = communicator->[I]stringToProxy[/I]("IceStorm/TopicManager");[/COLOR]  
     [COLOR=#000000]    IceStorm::TopicManagerPrx topicManager = IceStorm::TopicManagerPrx::checkedCast(obj);[/COLOR]  
     [COLOR=#000000]    IceStorm::TopicPrx topic;[/COLOR]  
     [COLOR=#000000]    while (!topic) {[/COLOR]  
     [COLOR=#000000]        try {[/COLOR]  
     [COLOR=#000000]            topic = topicManager->retrieve("Weather");[/COLOR]  
     [COLOR=#000000]        } catch (const IceStorm::NoSuchTopic&) {[/COLOR]  
     [COLOR=#000000]            try {[/COLOR]  
     [COLOR=#000000]                topic = topicManager->create("Weather");[/COLOR]  
     [COLOR=#000000]            } catch (const IceStorm::TopicExists&) {[/COLOR]  
     [COLOR=#000000]                // Another client created the topic.[/COLOR]  
     [COLOR=#000000]            }[/COLOR]  
     [COLOR=#000000]        }[/COLOR]  
     [COLOR=#000000]    }[/COLOR]  
         
     [COLOR=#000000]    Ice::ObjectPrx pub = topic->getPublisher()->ice_datagram();[/COLOR]  
     [COLOR=#000000]    Test::mytopicPrx monitor = Test::mytopicPrx::uncheckedCast(pub);[/COLOR]  
     [COLOR=#000000]    IceUtil::Time start = IceUtil::Time::now();[/COLOR]  
     [COLOR=#000000]    long i = 0;[/COLOR]  
     [COLOR=#000000]    while (true) {[/COLOR]  
     [COLOR=#000000]        double time = IceUtil::Time::now().toMicroSecondsDouble();[/COLOR]  
     [COLOR=#000000]        monitor->reportTime(time);[/COLOR]  
         
     [COLOR=#000000]        //std::cout << time << std::endl;[/COLOR]  
     [COLOR=#000000]        if (i % 10000 == 0)[/COLOR]  
     [COLOR=#000000]            std::cout << i << " rate: " << i/(IceUtil::Time::now()-start).toSecondsDouble() << std::endl;[/COLOR]  
     [COLOR=#000000]        i++;[/COLOR]  
     [COLOR=#000000]//        sleep(1);[/COLOR]  
     [COLOR=#000000]        usleep(1000);[/COLOR]  
     [COLOR=#000000]    }[/COLOR]  
     [COLOR=#000000]}[/COLOR]  
    
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I suppose the exception comes from the publisher process. An Ice::NoEndpointException indicates that the IceGrid node failed to start the IceBox server. Can you check the error message in the IceGrid node log file or on the standard error output where you started the IceGrid node?

    Any chance you could try your test case with the latest Ice 3.6.1 version?

    Cheers,
    Benoit.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    This is the error from start up:

    !! 11/07/15 01:21:42.897 IceStorm: error: ServiceManager: exception while starting service IceStorm:
    ObjectAdapterI.cpp:1239: Ice::EndpointParseException:
    error while parsing endpoint `invalid object adapter endpoint `udp,tcp''



    I can try to compile Ice 3.6.1 and check it.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Sorry, I meant udp:tcp for the endpoints not udp,tcp.

    Cheers,
    Benoit.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    benoit wrote: »
    Hi,

    Sorry, I meant udp:tcp for the endpoints not udp,tcp.

    Cheers,
    Benoit.
    Ok, that worked, thanks.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    Unfortunately, the compilation of Ice 3.6.1 fails because lmdb.h cannot be found.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    It sounds like you checked out the master branch instead of the 3.6 branch.

    To checkout the 3.6 branch in your existing ice repository: git checkout -b 3.6 origin/3.6

    Cheers,
    Benoit.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    Yeah,I checked out the master branch at tag 3.6.
    With branch 3.6 it works.

    The problem with 3.6 is not the same.

    The performance does not get worse on restart now, but it degrades over time:
    t is the delay in ms and rate is the report frequency.
    [COLOR=#000000][FONT=Monospace]Starting /home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver...[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]-! 11/10/15 11:31:52.481 warning: unknown property: `Ice.GC.Interval'[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]0 rate: 0[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 88.452[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]1000 rate: 3363.88[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.023[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]2000 rate: 3363.88[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.999[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]3000 rate: 3366.4[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.988[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]4000 rate: 3370.71[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.267[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]5000 rate: 3330.95[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.926[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]6000 rate: 3341.19[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.686[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]7000 rate: 3320.44[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.466[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]8000 rate: 3327.19[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.166[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]9000 rate: 3334.84[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.902[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]10000 rate: 3339.13[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.391[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]11000 rate: 3339.97[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.127[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]12000 rate: 3342.34[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.882[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]13000 rate: 3346.03[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.744[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]14000 rate: 3329.95[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.579[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]15000 rate: 3329.33[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.608[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]16000 rate: 3331.77[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.615[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]17000 rate: 3334.84[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.462[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]18000 rate: 3333.3[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.856[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]19000 rate: 3332.96[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.718[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]20000 rate: 3334.48[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.936[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]21000 rate: 3309.41[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.96[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]22000 rate: 3310.8[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.37[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]23000 rate: 3312.46[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.506[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]24000 rate: 3314.57[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 87.663[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]25000 rate: 3171.14[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 82.251[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]26000 rate: 3179.25[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.034[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]27000 rate: 3178.34[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 85.53[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]28000 rate: 3185.5[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.867[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]29000 rate: 3192.1[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.331[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]30000 rate: 3199.29[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 82.307[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]31000 rate: 3205.82[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 83.732[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]32000 rate: 3211.27[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 84.374[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]33000 rate: 3216.72[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 86.154[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]34000 rate: 3215.92[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 82.378[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]The program has unexpectedly finished.[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]/home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver crashed[/FONT][/COLOR]
      [COLOR=#8D8D8D][FONT=Monospace] [/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]Starting /home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver...[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]-! 11/10/15 11:32:08.202 warning: unknown property: `Ice.GC.Interval'[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]0 rate: 0[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 107.667[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]1000 rate: 2658.27[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 107.05[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]2000 rate: 2659.6[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 110.365[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]3000 rate: 2619.97[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 117.137[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]4000 rate: 2629.89[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 107.034[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]5000 rate: 2636.62[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 106.543[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]6000 rate: 2637.84[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 108.979[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]7000 rate: 2634.78[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 108.771[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]8000 rate: 2634.1[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 108.289[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]9000 rate: 2618.28[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 109.332[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]10000 rate: 2617.8[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 111.227[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]11000 rate: 2618.14[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 109.163[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]12000 rate: 2612.31[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 112.781[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]13000 rate: 2611.39[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 111.174[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]14000 rate: 2602.56[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 123.593[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]15000 rate: 2601.32[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 112.318[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]16000 rate: 2598.17[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 110.265[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]17000 rate: 2580.59[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 156.164[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]The program has unexpectedly finished.[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]/home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver crashed[/FONT][/COLOR]
      [COLOR=#8D8D8D][FONT=Monospace] [/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]Starting /home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver...[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]-! 11/10/15 11:32:34.610 warning: unknown property: `Ice.GC.Interval'[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]0 rate: 0[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 242.323[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]1000 rate: 1326.57[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 186.678[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]2000 rate: 1229.23[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 203.609[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]3000 rate: 1130.15[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 182.629[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]4000 rate: 958.725[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 478.952[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]5000 rate: 954.739[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 470.873[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]6000 rate: 909.507[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 344.708[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]7000 rate: 884.679[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 418.654[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]8000 rate: 900.049[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 157.412[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]9000 rate: 865.019[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 494.234[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]10000 rate: 862.413[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 410.041[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]11000 rate: 843.96[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 402.54[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]12000 rate: 846.718[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 480.064[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]13000 rate: 847.034[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 164.885[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]14000 rate: 840.451[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 379.027[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]15000 rate: 846.84[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 327.435[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]16000 rate: 826.43[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 491.875[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]17000 rate: 822.761[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 439.995[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]18000 rate: 393.68[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 366.745[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]19000 rate: 407.177[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 196.18[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]20000 rate: 419.731[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 269.581[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]The program has unexpectedly finished.[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]/home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver crashed[/FONT][/COLOR]
      [COLOR=#8D8D8D][FONT=Monospace] [/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]Starting /home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver...[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]-! 11/10/15 11:33:25.429 warning: unknown property: `Ice.GC.Interval'[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]0 rate: 0[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 322.524[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]1000 rate: 660.399[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 516.21[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]2000 rate: 657.849[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 358.413[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]3000 rate: 618.064[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 588.815[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]4000 rate: 614.393[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 448.816[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]5000 rate: 607.728[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 576.378[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]6000 rate: 625.453[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 275.551[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]7000 rate: 621.36[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 348.44[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]8000 rate: 623.168[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 557.374[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]9000 rate: 626.416[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 506.954[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]10000 rate: 628.3[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 287.235[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]11000 rate: 619.222[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 384.061[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]12000 rate: 620.604[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 589.764[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]13000 rate: 622.612[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 604.838[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]14000 rate: 626.236[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 269.688[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]15000 rate: 623.291[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 505.884[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]The program has unexpectedly finished.[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]/home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver crashed[/FONT][/COLOR]
      [COLOR=#E7E7E7][FONT=Monospace] [/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]Starting /home/waechter/projects/testarea/icetopictest/client/build-TopicReceiver-Qt_4_8_4_System-Debug/TopicReceiver...[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]-! 11/10/15 11:33:56.023 warning: unknown property: `Ice.GC.Interval'[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]0 rate: 0[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 487.782[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]1000 rate: 525.152[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 675.759[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]2000 rate: 522.861[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 712.311[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]3000 rate: 498.86[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 1072.52[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]4000 rate: 506.057[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 705.85[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]5000 rate: 511.892[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 626.244[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]6000 rate: 510.158[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 683.599[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]7000 rate: 514.33[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 505.266[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]8000 rate: 515.224[/FONT][/COLOR]
      [COLOR=#000000][FONT=Monospace]t: 379.517[/FONT][/COLOR]
    
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    I tried your test case on Ubuntu 15.04 with Ice 3.6.1 and I'm not seeing this issue. The delay to receive the event remains stable. I tried restarting the publisher and changing the frequency of the updates too. Any chance you could try on another platform to see if you get the same problem?

    Note that the rate computation in the test case you provided in the post above isn't correct. I also recommend to use an average for "t" instead of just taking snapshots every 1000 samples.

    Cheers,
    Benoit.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    benoit wrote: »
    Hi,

    I tried your test case on Ubuntu 15.04 with Ice 3.6.1 and I'm not seeing this issue. The delay to receive the event remains stable. I tried restarting the publisher and changing the frequency of the updates too. Any chance you could try on another platform to see if you get the same problem?

    Note that the rate computation in the test case you provided in the post above isn't correct. I also recommend to use an average for "t" instead of just taking snapshots every 1000 samples.

    Cheers,
    Benoit.


    I'll try to setup something with Ubuntu 15.04 when I have some time.

    What's wrong with the rate computation? I cannot find any error right now. It is the average rate starting from the first reportTime() call.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Here's the code you provided:
    void reportTime(Ice::Double t, const Ice::Current&)  
    {  
         static IceUtil::Time start = IceUtil::Time::now();  
         Ice::Double time = IceUtil::Time::now().toMicroSecondsDouble();  
     //  if (i % 100 == 0)  
         {  
            std::cout << i << " rate: " << i/(IceUtil::Time::now()-start).toSecondsDouble() << std::endl;  
            std::cout << "t: " << (time-t)/1000/1000 << std::endl;  
        }  
        i++;  
    }  
    

    The start variable is a local variable so the rate isn't computed based on the first reportTime call but on the call being dispatched.

    Cheers,
    Benoit
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    it's a static variable ;)
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Oops, sorry I missed the static! We usually don't use them since their initialization isn't thread-safe with some compilers...

    Cheers,
    Benoit.
  • MirkoWaechterMirkoWaechter Member Mirko WaechterOrganization: University of KarlsruheProject: ArmarX Robot Framework
    Yeah, sure. I was just lazy in the example :).
Sign In or Register to comment.