+ Reply to Thread
Results 1 to 3 of 3

Thread: Precisely Measure Task Round-trip Performance of your Application

  1. #1
    lechen's Avatar
    lechen is offline Junior Member
    Join Date
    March 12th, 2008
    Location
    Toronto, Ontario
    Posts
    71
    Blog Entries
    1
    Downloads
    8
    Uploads
    0

    Default Precisely Measure Task Round-trip Performance of your Application

    1. Objective

    For performance evaluation, I want to measure how long it takes from the time I send my task to Symphony DE, to the time I receive the result.



    2. Configuration Tips
    • In application profile, set preStartApplication="true". By doing so, we discount SSM and SIM initial startup time (roughly an additional 500 milliseconds) from the actual Task round-trip performance.
    • Remove output messages (to stout or log file) from the client the service application. By doing so, we eliminate any I/O overhead which may incur.
    • Set all component (SD, SSM, SIM, API) log levels to WARN. By doing so, we eliminate I/O overhead for the system daemons. (log4j configuration files are located under SOAM_HOME/conf)
    3. Code

    In client application (I used samples/CPP/SampleApp/SyncClient for demonstration):

    1) Include ACE's High-Resolution Timer (precise to 1 microsecond, which is 1/1000000 of a second):
    Code:
    #include <ace/High_Res_Timer.h> 
    2) Initialize and start timer right before task is submitted:

    Code:
    ACE_High_Res_Timer m_timer;
     
    m_timer.reset();
    m_timer.start();
     
    // send it
    TaskInputHandlePtr input = sesPtr->sendTaskInput(attrTask); 
    3) Stop timer right after result is fetched:

    Code:
    // Now get our results - will block here until all tasks retrieved
    EnumItemsPtr enumOutput = sesPtr->fetchTaskOutput(tasksToSend)
     
    m_timer.stop(); 
    4) Output round-trip time (displayed in microseconds)

    Code:
    ACE_hrtime_t usecs;
    m_timer.elapsed_microseconds(usecs);
     
    cout << "Round-trip Time: " << usecs << " us" << endl; 
    In Makefile:

    1) Include the ACE include files:
    Code:
    INCLUDE = -I $(TOP)/include -I ../Common -I /home/lechen/ACE/5.4.4 
    2) Include the ACE libraries:
    Code:
    LIBS = -L $(OUTPUT) -L $(TOP)/$(ARCH_BUILD)/lib
     -L /home/lechen/ACE/5.4.4/lib/$(ARCH_BUILD).fd6144/ -lACE \
       -lsampleCommon -lsoambase -lsoamapi 
    4. My Results:

    Sample SyncClient Single Task Round-Trip: ~2.9 milliseconds (0.0029 seconds). Result varies depending on message size, as well as CPU and network speed.

    Code:
    lechen@ib08b05-715: ./Output/SyncClient
    connection ID=8759dee4-ffff-ffff-c000-00112529883c-42851248-7361
    Session ID:287
    Round-trip Time: 2859 us
     
    lechen@ib08b05-716: ./Output/SyncClient
    connection ID=87a81d16-ffff-ffff-c000-00112529883c-42851248-7361
    Session ID:288
    Round-trip Time: 2907 us
     
    lechen@ib08b05-717: ./Output/SyncClient
    connection ID=88073918-ffff-ffff-c000-00112529883c-42851248-7361
    Session ID:289
    Round-trip Time: 2917 us
     
    lechen@ib08b05-718: ./Output/SyncClient
    connection ID=885f11e2-ffff-ffff-c000-00112529883c-42851248-7361
    Session ID:290
    Round-trip Time: 2874 us 
    5. Related Articles:
    Comments welcomed.
    Last edited by Ajith; July 16th, 2008 at 07:39 PM.

  2. #2
    vitali is offline Junior Member
    Join Date
    July 29th, 2008
    Location
    Mississauga
    Posts
    9
    Downloads
    10
    Uploads
    0

    Default Do I need to include any other ACE classes to use your sample

    Do I need to include any other ACE classes to use your sample? I know for initialization of ACE you need specify several other files.

  3. #3
    Ajith's Avatar
    Ajith is offline Symphony DE Moderator
    Join Date
    February 28th, 2008
    Location
    Markham, Ontario
    Posts
    104
    Blog Entries
    2
    Downloads
    10
    Uploads
    0

    Default ACE Compile

    If it doesn't compile, you may need to add;

    #include <ace/ACE.h>

    - Ajith

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts