Jump to content
We have recently updated our Privacy Statement, available here ×
  • BW 6.X - BW5.X - How to ensure stable response times in BusinessWorks


    In context where BusinessWorks exposes synchronous services like WEB Services, REST Services or JMS request / reply services it is generally important to have short response times and this to be consistent over time.

    But BusinessWorks is a Java application and can be impacted by the Garbage Collection mechanism.

    In BusinessWorks 6.X releases prior to 6.8.x and BusinessWorks 5.X releases prior to 5.15.x the default Java Garbage Collector is not fully multi-threaded and this can lead to situation where the Java Virtual Machine stops processing for tenth of seconds, I have seen up to two minutes in performance tests, and this lead to situations where the BusinessWorks engine freeze during that time.

    If you are curious about this I suggest to search for ‘Stop the world Garbage Collection’ on forums like Stack Overflow.

    Recent BusinessWorks releases are not impacted while they are using Java 11 and its default Garbage Collector is G1GC, that works in a multi-threaded mode. Instead of stopping the JVM periodically to do a big garbage collection, this mechanism does a lot of small garbage collections in the background, without stopping the JVM (or only for a short period of time), to ensure minimal disruption of processing.

    The good news is that older BusinessWorks releases that are using ORACLE Java 8 can also use the G1GC Garbage Collector. This article explain how to enable G1 Garbage Collector (‘G1GC’) in BusinessWorks 5.X and BusinessWorks 6.X environments. This apply only for servers running under Linux, Windows and Solaris, while in other environments BusinessWorks is using other JVMs.

    BusinessWorks 5.X

    In BusinessWorks 5.X this can be done using the following approach :

    1) Edit bwengine.tra file (to be done on all machines) to add the following line at the end of the file (or update the existing value of the java.extended.properties to include the option below) :

    java.extended.properties= -XX:+UseG1GC

    2) Redeploy all the applications for the new parameter to be taken into account.

    Note : in case some applications would be using specific .tra files, that set the java.extended.properties property with a specific value, you will have to update the mechanism used to create those files to include the mentioned property.

    BusinessWorks 6.X

    In BusinessWorks 6.X this can be done using the following approach:

    1) Edit bwappnode.tra file (to be done on all machines) to update the existing value of the java.extended.properties property to include the ‘-XX:+UseG1GC’ option, for example:

    java.extended.properties=-Xmx1024m -Xms128m -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError

    2) Restart the appnodes.

    Note : in case some appnodes would be using specific .tra files, that set the java.extended property with a specific value, you will have to update these files one by one.

    Note that in BusinessWorks Container Edition the appnode configuration in the Docker base image is configured by default to use G1GC.

    Things to keep in mind

    In theory using G1GC might increase a bit the cpu usage, but I never heard complains on this from TIBCO customers using G1GC with Java 1.8.

    Useful to know in AIX environment

    In AIX environment where the IBM JVM is used the equivalent of G1GC seems to be the ‘gencon’ garbage collector.

    According to IBM online documentation this can be enabled with the following command line option:

    -Xgcpolicy\:gencon

    This option can be set using the java.extended.properties property has mentioned above.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...