Multi-threaded optimization

You can enable multi-threaded optimization to improve the performance of Contact Optimization, that is, shorten the amount of time it takes to run a Contact Optimization session.

To enable multi-threaded optimization, set the EnableMultithreading configuration property to true.

Note: If you have multiple processors or cores, the number of processors or cores, therefore the maximum number of threads you can use, might be restricted by your Contact Optimization license. Contact your HCL® representative for more details.

Enabling multi-threaded optimization might significantly improve Contact Optimization performance. The amount of performance improvement depends on many factors, including:

  • The type of optimization rules you use
  • The interaction of those rules with your data
  • The speed of your database I/O
  • Your type and configuration of hardware

Keep in mind the build chunk time, and avoid using multi-threading with high volumes. If the build chunk time is larger than the chunk process time, multi-threading of the chunk processing stage might not be effective. RAM size, CustomerSampleSize, contact (CH/DCH) history table size, and number of rules are just a few factors that can affect performance.

The maximum degree of parallelism achievable is governed by the non-parallel portions of processing and differs from Contact Optimization session to Contact Optimization session.

In general, use the following guidelines.

  • Enabling multi-threaded optimization can improve the performance of the optimization stage only.

    A significant portion of an optimization session run includes the following steps:

    1. Reading data from the proposed contacts table (PCT).
    2. Representing the optimization rules.
    3. Preparing and retrieving data from the database.
    4. Randomizing and creating chunks.
    5. Writing to the optimized contacts table (OCT).

    Multi-threaded optimization does not affect these processes, which run serially. To improve the performance of reading the PCT and writing the OCT, consider using a database load utility and optimizing your database configuration.

  • If you do not use cross-customer rules in your Contact Optimization sessions, multi-threaded optimization has limited improvement.

    Contact Optimization uses multi-threaded optimization most when processing the algorithms that implement cross-customer rules.

  • In general, the maximum number of threads available should be equal to or higher than the highest achievable degree of parallelism to maximize performance. However, you might find that other hardware limitations reduce the performance leverage of multiple threads. For example, if insufficient RAM is available to support the number of threads in use, the optimization session might not be able to run. If your hardware has multiple cores (instead of processors), and multiple hardware threads use the same cache, your performance might be limited by the cache I/O.

    You define the number of threads processing the cross-customer rules with the MaxCustomerSampleProcessingThreads configuration property. You might need to tune your system to find the optimal value of this setting that is based on your available RAM and hardware performance characteristics.

  • You might be able to run more threads in parallel if you have a smaller CustomerSampleSize because the RAM usage per thread goes down. However, decreasing this value also decreases the amount of time that is required to process a chunk. This configuration also decreases the ration between chunk processing and preprocessing, causing the latter to become a bottleneck sooner.
  • If you optimize the number of threads that process the cross-customer rules, you might be able to increase performance further by increasing the number of threads that are used to read data from a sample of customers or the threads that are used to write the optimized contacts to a staging table.

    You define the number of threads that read data from a sample of customers with the ProcessingThreadQueueSize configuration property. You define the number of threads that write data to a staging table with the PostProcessingThreadQueueSize configuration property.

For more details about tuning multi-threaded optimization for your specific Contact Optimization implementation, contact your HCL representative.