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
3. Code
- 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)
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):
2) Initialize and start timer right before task is submitted:Code:#include <ace/High_Res_Timer.h>
3) Stop timer right after result is fetched:Code:ACE_High_Res_Timer m_timer; m_timer.reset(); m_timer.start(); // send it TaskInputHandlePtr input = sesPtr->sendTaskInput(attrTask);
4) Output round-trip time (displayed in microseconds)Code:// Now get our results - will block here until all tasks retrieved EnumItemsPtr enumOutput = sesPtr->fetchTaskOutput(tasksToSend) m_timer.stop();
In Makefile:Code:ACE_hrtime_t usecs; m_timer.elapsed_microseconds(usecs); cout << "Round-trip Time: " << usecs << " us" << endl;
1) Include the ACE include files:
2) Include the ACE libraries:Code:INCLUDE = -I $(TOP)/include -I ../Common -I /home/lechen/ACE/5.4.4
4. My Results:Code:LIBS = -L $(OUTPUT) -L $(TOP)/$(ARCH_BUILD)/lib -L /home/lechen/ACE/5.4.4/lib/$(ARCH_BUILD).fd6144/ -lACE \ -lsampleCommon -lsoambase -lsoamapi
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.
5. Related Articles: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
Comments welcomed.


LinkBack URL
About LinkBacks
Reply With Quote