Integrate Software AG Products Using Digital Event Services 10.5 | Integrate Software AG Products Using Digital Event Services | webMethods Task Engine User’s Guide | Configuring the Task Engine Environment | About Task Engine Optional Settings | Preload the Task Cache at Startup
 
Preload the Task Cache at Startup
This option preloads tasks into the My webMethods Server internal caches in a single query during startup of My webMethods Server. This helps alleviate performance problems during a restart of My webMethods Server when there is a very large number of tasks in the database.
Note: This cache preloading option has no impact on indexed task searches, as indexed searches do not use caches and always load tasks from database.
When this option is not enabled, the caches are empty upon restart, and performance issues can occur with task search queries that need to scan large number of tasks. Because tasks are loaded into the caches one at a time, it may take a very long time to process these initial queries until the caches are fully loaded.
Task preloading is disabled by default. To enable preloading, you must specify how many tasks to preload using the following system property:
-Dtask.max.preload=<maximum number of tasks to preload>
By default, only Active tasks are preloaded. You can also specify an optional condition to define which tasks to preload. For more information, see Set Conditions for Task Preloading.
One thing to consider when setting this option is the size of business data and the total maximum memory given to My webMethods Server. In some cases it may be not possible to fit all tasks into the available in-memory caches. If you specify too many tasks to preload, it should not cause an out of memory error (as in-memory caches will not grow beyond of memory available), but it will waste system resources during preload.
Before you implement preloading, you must also configure the default cache sizes for My webMethods Server to be at least equal to or greater than the number of tasks to be preloaded. To do so:
1. Obtain the cache.xml configuration file by running the following command: MWS/bin/mws.bat|sh getconfig cache.xml. This saves a copy of the cache.xml file to the following directory: Software AG_directory /MWS/serverName/config.
2. Open the cache.xml and edit maxSize for "ThingCache" and "TaskDataCache" to be equal to or greater than the number of tasks to preload.
3. Save the file.
4. Upload cache.xml back to the database by running the following command: MWS/bin/mws.bat|sh putconfig cache.xml
For example:
<cache name="TaskDataCache"
class="com.webmethods.portal.service.cache.impl.TransientCache"
maxSize="number of tasks to preload"
isClustered="true"
ID= "12"
enabled="true"/>
<cache name="Thing Cache"
class="com.webmethods.portal.service.meta2.impl.ThingTransientCache"
maxSize="number of tasks to preload"
isClustered="true"
ID= "1"
enabled="true"/>

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.