Thread Processing Guidance

From Grooper Wiki
Revision as of 10:37, 6 February 2026 by Dgreenwood (talk | contribs)

Grooper Activity Processing services distribute processing resources to automated tasks in a Batch Process. This article explains how thread processing works and outlines best practices for using threads effectively.

What is a thread?

A thread is the smallest unit of execution within an operating system.

  • Threads are the "workers" that carry out tasks in a software application.
  • Performance cores typically support 2 threads per core.
  • Efficiency cores typically support 1 thread per core.

How can I find out how many threads my machine has?

Physical machines

  • Open Windows Task Manager.
  • Go to Performance.
  • Threads are listed as Logical processors.

Virtual machines

  • Open Windows Task Manager.
  • Go to Performance.
  • Threads are listed as Virtual processors.

How does Grooper utilize threads?

Primary

Threads are used by Activity Processing services to automate Activity tasks in a Batch Process.

  • The number of threads an Activity Processing service can use is defined by the Number of Threads setting.
  • Multiple Activity Processing services may be installed on a single machine.
  • Activity Processing services may also be installed on additional machines connected to the same Grooper Repository to distribute processing across multiple servers.

Secondary

The Grooper Application Pool uses threads on the Grooper Web Server to run the Grooper Web Application as users interact with it.

Is it better to have one Activity Processing service with many threads, or several with fewer threads?

It is generally more efficient to distribute available threads across multiple Activity Processing services on a machine.

  • The typical sweet spot is 3–4 threads per service.
  • Example: On a processing server with 50 available threads, overall throughput is usually better with 16 Activity Processing services using 3 threads each than with a single service using all 50 threads.

How should I be using Processing Queues?

Processing Queues help control how threads are distributed across specific steps in a Batch Process.

  • Processing Queues are assigned to Batch Process Steps and Activity Processing services.
    • Batch Process Steps use the Queue Name property to specify a Processing Queue.
    • Activity Processing services also use the Queue Name property to bind to a Processing Queue.
  • If threads are considered "workers", Processing Queues act as "managers" that route workers to specific activities.
  • Processing Queues should be used for resource-intensive or long-running Activity tasks to prevent bottlenecks.
    • While such bottlenecks may not reduce total throughput over time, they can result in uneven flow to Review or Export steps.
    • Example: Recognize is often a long-running step due to OCR processing. If all threads are occupied with Recognize tasks, other steps will remain idle until those tasks complete.