Tuning the performance of instance migration

You can improve the performance of migrating process instances by adjusting configuration options for migrating instances.

About this task

Performance depends on the number of instances in the process, the number of tasks in those instances, and the size of the execution context. To improve the performance of migrating instances from one snapshot to another snapshot, you can configure the migration process. The configuration options determine which tasks to migrate, set the number of threads in the pool, and whether to defer updating the execution context of the tasks. The 99Local.xml file contains the default values for these configuration options:
<server>
  <instance-migration>
    <thread-pool-size>5</thread-pool-size>
    <migrate-tasks>skip-closed<migrate-tasks>
    <defer-ec>false</defer-ec>
  </instance-migration>
</server>

Procedure

  1. Consider deleting completed tasks. For information about the command that you can run to delete completed tasks, see BPMTasksCleanup wsadmin command.
  2. Open the 100Custom.xml file and set the migration configuration options. If you do not set an option, the migration process uses the default value.
    Table 1. Migration performance tuning options
    Option Description Choices
    <thread-pool-size> Set the thread pool size. The default is 5.
    <migrate-tasks> Choose which tasks to migrate.
    • all - Migrate all tasks
    • none - Migrate no tasks
    • skip-closed - Migrate all tasks except closed tasks
    .
    <defer-ec> Choose whether to defer updating the execution context of the tasks.

    true or false

    The default is false. To ensure that corrupt execution contexts are detected during migration, leave the setting to false in the development environment. If necessary to improve performance, you can change the value to true in the production environment.

  3. In the test environment, test how long the migration takes with 100 instances. From that result, estimate the time that the whole migration requires. Adjust the migration configuration options and retest until you get the performance that you need.
  4. In the production environment, use what you learned in the test environment and what you learned from previous migrations to set the migration configuration options for the production environment.

Example

The following example shows thread-pool-size set to 10 and defer-ec set to true, while migrate-tasks is left as the default, skip-closed.
<server>
  <instance-migration merge="mergeChildren"> 
    <thread-pool-size merge="replace">10</thread-pool-size>
    <defer-ec merge="replace">true</defer-ec>
  </instance-migration>
</server>
The following example shows thread-pool-size set to 10 and migrate-tasks set to all, while defer-ec is left as the default, false.
<server>
  <instance-migration merge="mergeChildren"> 
    <thread-pool-size merge="replace">10</thread-pool-size>
    <migrate-tasks merge="replace">all</migrate-tasks>
  </instance-migration>
</server>
The following example shows overriding all three values.
<server>
  <instance-migration merge="mergeChildren"> 
    <thread-pool-size merge="replace">8</thread-pool-size>
    <migrate-tasks merge="replace">none</migrate-tasks>
    <defer-ec merge="replace">true</defer-ec>
  </instance-migration>
</server>