Describing the Purpose of Multithreading

Objective

After completing this lesson, you will be able to describe the purpose of multithreading.

Multithreading

The Multithreading feature allows you to configure certain processes to be multi threaded, allowing the work to be divided into separate and mostly equal threads. This is a powerful tool to reduce process runtimes as volume grows with your business.

Let’s look at an example of how multithreading works. Let’s say we have 100,000 transactions that need to be posted. When the TranHead Post Task is single threaded, the TranHead Post task processes all 100,000 transactions in batches, typically set for 700 at a time.

If we set the TranHead Post task to be multi threaded with 4 threads, APM will do the following:

  • Split the number of transactions into four approximately equal groups of transactions along logical lines; for example, by customer.
  • Assign each transaction to a thread.
  • Process each thread simultaneously in batches.
  • When all four threads have completed, the next task is processed.

Additional Considerations for Multithreading

Multi threading is not always beneficial for every task within a process. There is an overhead cost (time) for dividing the work and assigning the work to the threads. For example, if you are only normally posting 1000 transactions, it may take more time for APM to divide the work, assign the work and process each thread than it would be to just post the 1000 transactions in a single thread. In general, multithreading is beneficial if you have a very high number of records to process.

Configure a Process with Multithreading

To configure an existing process with multithreading.

Steps

  1. From the Administrator menu, select Processing ConfigurationProcess Configuration Search.

  2. Select the process. In the example below, we are using the Transaction Post task.

  3. Select the Distribute Process checkbox.

    The Process Configuration Detail screen. The Distribute Process checkbox is enabled, activating multithreading.
  4. Enter the maximum number of threads.

  5. Select Save.

Summary

  • Multithreading splits processes into equal threads to reduce runtimes as workloads grow and business scales.
  • Multithreading in beneficial for high workloads. For small workloads, the setup overhead may make it less efficient.
  • To configure multithreading, from the Process Configuration screen, enable Distribute Process, set maximum threads, and save the configuration.