While developing services and business processes for Enterprise Applications Integration using TIBCO BusinessWorks, performance always remains the top most concern and requires utmost attention from architecture planner as well as developers.
In this post, I will explain 10 tips for performance improvement of TIBCO BW:
- Use of FLOW LIMIT and MAX JOBS parameters are important for tuning performance of TIBCO BW engines. If your TIBCO BusinessWorks Engine can handle peak message rates you should consider using MaxJobs=0 and FlowLimit = 0.FLOW LIMIT parameter is used to control the number of jobs to be created for incoming requests.
Recommended: An Overview of Using MAX JOBS, FLOW LIMIT and ACTIVATION LIMIT For Process Configuration - TIBCO BW engine thread count should also be specified in an optimized way to best utilize the resources. Default value of 8 threads should be used initially but if CPU resources are available and need arises; thread count should be doubled till the time maximum CPU resources get utilized.
- For better memory utilization and proper garbage collection, parameter EnableMemorySavingMode=true plays a significant role. This TIBCO BusinessWorks property allows the engine to release references to unused process data so that it can be garbage collected by the JVM, thus improving the performance of processes with large amounts of data.
- JVM Heap size, garbage collection settings and Server VM vs Client VM settings are also useful while tuning TIBCO BW performance. For small scale TIBCO environments, 256MB heap size is ideal but it can be changed to 512MB or 1GB or even more for medium and large scale TIBCO environments. The total amount of JVM memory needed to operate a TIBCO BusinessWorks Engine should be the memory for each process plus the maximum number of processes that can be in the process pool. If flow control is enabled, the process pool can contain up to the MaxJobs value.
- JDBC activities used in TIBCO BW Processes require greater attention from performance point of view as database related operations have higher delays associated. Try to use lesser JDBC activities to the best possible way. Also, make sure that JDBC queries used are well optimized and there aren’t high costs associated with these queries. Database table locks should also be taken care of. For JDBC activities, proper timeout parameter should be specified so that unnecessary delays are avoided.
- Global variables should be created only when and where needed. Using excessive Global variables results in high latency and additional memory consumption. For shared variables, variable instantiation should be made only at process startup time using OnStartup activity so that same data is used by all processes in the JVM.
- Sub process calling using Call Process activity should be considered only when it is necessary to arrange the code in a sub process. When data is mapped from parent process to a sub process, data copy is created which has an additional cost. Memory limitations should be kept in mind while developing sub process based TIBCO applications. For heavy asynchronous sub-processes, SPAWN parameter should be used.
- In the processes where FTP activities are used, session caching should be used. Session caching can improve performance by reducing number of sessions created as same session gets used for multiple activities for same host.
- For SOAP over HTTP or SOAP over JMS, message size should be kept as small as possible as heavy payloads with higher processing requirements affect the performance.
- TRANSFORM XML activity has an added overhead associated with it as it invokes XSL parser so it should be avoided. It is suggested to use Mapper activity instead if it can serve the purpose. Mapper works dynamically by loading the definition in dynamic fashion which results in better performance.
For a deeper look, you can refer to my video on TIBCO BW Design & Development Best Practices where various best practices are explained in detail.
I have few questions .. can you please provide answers for them ..
What is the max # of cpu’s a BW engine can use?
What determines the # of cpu’s a process can use?
How many cpu’s can an EMS server use?
how to do fult tollrence ,
Hi Ajmal,
Thanks for your post. Its very much helpful.
I am working as an Tibco Administrator along with configuration & deployment of BW applications.
I am also working on Tibco EMS/BW configurations for setting up FT/LB instances. I have done it many times, but I did not got a chance to set up a SSL configuration for EMS. Could you please help me on that and share your suggestion on my mail.
Regards,
Ashok Satwaliya
ask.cse07@gmail.com
Hi Ajmal
You have written shared variable should only be instantiated in OnStartup activity. But is there any other place or case scenario to instantiate shared variable other than onstartup activity. As in tibco doc it is written that it should be shared by all the processes.
Yes it is shared by all the process.
But the logic here is to initialize that variable at the very starting with the help of On startup.
After that the value of the shared variable can be accessed by any of the processes as per the requirement.
Hi Ajmal
I wonder if there is a correct way to configure the thread pool so that the threads are cut or finished after 30 seconds, currently the threads are taken for indefinite minutes and we can only kill them per system. Thanks a lot.