The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Articles
Read more about TIBCO use cases, product features, capabilities and more
  • BW6.X - BWCE - BW5.X - How to enable Engine Memory Saving mode in BusinessWorks 6.X and BusinessWorks Container Edition


    In context where large chunks of data have to be processed (large files, large SAP Idocs, large messages, …) memory usage by the BusinessWorks engine can be high but the Engine Memory Saving mode, introduced in BusinessWorks 6.6, can help reduce this.

    But first let’s explain what it is and how it works.

    Engine memory saving mode

    A BusinessWorks process if made of activities that in most cases produce an output that is used by some of the following activities.

    In the example process below when a new data file is detected, it is read and parsed, then data are filtered and mapped to a temporary structure, enriched using a database and finally and output structure is created, rendered in XML format and sent in a JMS Message.

    1*kqtnPlRiiqwV9EsvpWSfww.jpeg

    The standard behaviour of the BusinessWorks engine is to keep the output of all activities in memory (in the Java Heap) and to release memory only when the process execution is completed.

    This means that even if the output from the ‘ReadParseDataFile’ activity is not used after the ‘Filter Data’ activity execution it remains in memory until the process execution complete.

    It is easy to understand that memory usage is not optimal if the input file is large and the process execution is relatively long, and this is where Engine Memory Saving mode is useful.

    When this mode is enabled the engine manage dependencies between activities and when it is detected that the output of a previously executed activity is no longer needed the corresponding memory block is released.

    This reduces memory usage and allows the Java Garbage Collector to trigger more often, which surprisingly reduces a bit cpu usage (in the range of a few percent) as I have seen in performance tests.

    Engine Memory Mode needs to be enabled at both design time and runtime.

    Enabling your application for Engine Memory Mode

    Note : starting from BusinessWorks 6.9 the Engine Memory Saving mode is enabled by default in Studio

    In Studio go to ‘Windows -> Preferences -> BusinessWorks -> Process Diagram’ and check the ‘Enable Memory Saving Mode’ check box :

    1*UYZtSDLGLEj1RHUFINC_Kg.jpeg

    Click ‘Apply’ and ‘OK’. With this option new applications will automatically be configured for Memory Saving Mode.

    For existing applications you have also to update the application by doing the following :

    Select the application in the Project Explorer and do a ‘Right Click -> Refactor -> Repair BusinessWorks project’ and select the ‘Update memory saving variables option’.

    1*a8yQMFb75ePNsRrT6qI2fg.jpeg

    You can check that your application is enabled for Memory Saving Mode by opening one of its process definition files (a .bwp file), the following XML tags should be visible :

    1*bluvEitz1hBQ1gLUNWh8OA.jpeg

    Enabling Engine Memory Mode at runtime

    Note : starting from BusinessWorks 6.9 the Engine Memory Saving mode is enabled in the default appspaces and appnodes configurations

    The property bw.engine.enable.memory.saving.mode control the activation of the Memory Saving Mode for appnodes at runtime.

    It can be defined in different ways.

    To manage it at individual appnode level, you can set it to true in the config.ini file of each appnode.

    To manage it at appspace level, which is more convenient, you can edit the ‘appnode_config.ini_template’ (from bw/6.X/config folder), comment the following line

    bw.engine.enable.memory.saving.mode=false (to be done before appnode creation) and manage the activation of Memory Saving Mode in the config.ini file of your appspaces.

    Finally you can set it once for all for all appnodes of a server by commenting this property in both ‘appnode_config.ini_template’ and ‘appspace_config.ini_template’ (before appnode/appspace creation) and adding the following line at the end of the bwappnode.tra file :

    java.property.bw.engine.enable.memory.saving.mode=true

    In BWCE environment, this can be done by adding the following parameters to the BW_JAVA_OPTS list of options (see BWCE documentation for details):

    -Dbw.engine.enable.memory.saving.mode=true

    Summary

    In a context where large data chunks have to be processed the Memory Saving Mode can be used to reduce memory usage. This requires the application to be enabled for this in Studio and the memory mode to be enabled in the target appnodes.

    Reference information

    TIBCO BusinessWorks documentation : https://docs.tibco.com/pub/activematrix_businessworks/6.10.0/doc/html/Default.htm#perf-bench-tuning/memory-saving-mode.htm

    The blog from my esteemed colleague Aditya Wagle : https://adityawagle.com/memory-saving-mode-in-bw-6-6-x-and-bwce-2-5-x/

    Engine Memory saving mode in BusinessWorks 5.X

    Engine Memory Saving is also available for BusinessWorks 5.X.

    To enable it simply update the ‘EnableMemorySavingMode’ property in Administrator (nothing to do at design time).

    Go to your application configuration, and go to the ‘Advanced’ tab of the process archive configuration:

    1*_cu8_5lCHtxDJHNXYxQE6Q.jpeg

    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...