Introduction / FirstSpirit JMX Console / ExecutionManager

ExecutionManager

In FirstSpirit, a large number of actions are carried out concurrently in the background. This includes, for instance, updating reference graphs, processing client calls or even indexing documents. The ExecutionManager handles execution of these actions.

Classification of thread queues

The ExecutionManager manages a large number of differently classified thread queues. A thread queue contains the different tasks (client calls, for instance) up until they are executed. Thread queues can be configured based on their classification.

ThreadQueue.SERIAL: In the SERIAL classified queues, tasks are prepared that cannot be run concurrently. Since only one task can be carried out at a time, limiting the queue through configuration is not necessary.

ThreadQueue.LOW: of the memory or processor-intensive tasks prepared in the the queues classified as LOW, only a few can be executed simultaneously (default value is 2). An example of this is the indexing of documents. The number of tasks that may be run at the same time can be configured using the maxRunning parameter.

ThreadQueue.DEFAULT: DEFAULT is the default queue classification. All tasks are prepared in a queue classified as DEFAULT if they are not assigned to a different queue classification. The number of tasks that may be run at the same time can be configured using the maxRunning parameter.

ThreadQueue.HIGH: the queue classified as HIGH is used for all tasks that are to be run immediately. An example of this would be high-priority client calls (e.g. ping). Configuration is also unnecessary in this case.

ThreadQueue.BOUNDED: tasks in a queue classified as BOUNDED prepare the server calls of clients only. This queue can be limited in two ways. The number of active tasks and the capacity of the queue can be limited. If the maximum capacity of the queue is reached, additional client calls from the server are temporarily rejected before another attempt is initiated (rejection strategy).

Processing within the ExecutionManager

The following diagram illustrates how tasks are executed in the ExecutionManager. The values described here are available in the JMX console (see Attributes), and some are available in FirstSpirit ServerMonitoring:

Attributes

ExecutionRate: number of tasks executed within the last 60 seconds.

LastStartedTasks: shows the last tasks started (string array).

ScheduledTasks: in addition to the events triggered by user actions, there are also periodically scheduled internal actions. For instance, once every minute a check is made to determine if a session is still valid or if it has already finished. The value reflects the number of all regular pending actions.

TasksActive: a queued internal action (see TasksQueued) is passed from the queue to the second processing level of the ExecutionManager. The relevant task is then active, but not yet executed; it enters into the (limited) thread pool. The number of possible active tasks that enter the thread pool from the queue can be limited using the maxRunning parameter.

TasksQueued: if an action is initiated internally, such as indexing, the corresponding task is first queued. The value shown here provides the number of currently queued actions.

TasksEscaped: number of tasks executed outside of their actual queue because the queue is full.
Background: the ExecutionManager queues use a rejection strategy. If a queue is “bounded”, which means it is limited in size, tasks above this limit are passed to the rejection strategy. The called thread places its task in the queue and executes the oldest entry itself. These tasks are called “escaped” because they are not executed through their actual queue. The “overloaded” queue handles what are known as the called threads, and the “active” tasks of the queue exceed “maxRunning”. The queue capacity can be defined in the configuration file fs-server.conf.

: number of currently running actions (for instance, an indexing job or an event) within the limited and unlimited thread pool. The number of concurrently running tasks (via the limited ThreadPool) can be limited using the maxSize parameter.

TasksWaiting: number of actions already transferred from the corresponding queue, but still waiting for execution in the thread pool.

TotalExecuted: total number of executed actions.

ExecutionManager – Queues

ExecutionQueues: the ExecutionQueues entry provides an overview of all of the different managers' queues. The current queues can be viewed by double-clicking on an entry or using the left-hand navigation.

Each entry contains the following information:

Name of queue: the name is composed of the following:

  • The queue ID
  • The name of the manager using the queue
  • The project ID (This value is optional. Some managers, such as the Reference Manager, generate a queue for each project.)
  • The queue class. The possible classes are LOW, HIGH SERIAL, BOUNDED, DEFAULT (see Classification of thread queues). Some queue classes can be configured using the parameters in the configuration file fs-server.conf .

Number of active threads: number of active threads [a: number] passed from the queue to the thread pool (see TasksActive).

Number of queued tasks: number of queued tasks [q: number] waiting in the queue for their execution (see TasksQueued).

Number of tasks that can run concurrently:  number of tasks that are permitted to run simultaneously, [m: number] (see maxRunning).

Number of queued tasks: number of tasks [c: number] that are permitted to be queued within a “bounded” queue (see queueCapacity)

Number of running tasks:  number of tasks currently running [r: number] (such as an indexing job or an event) in the limited and unlimited thread pool (see TasksRunning).

Number of waiting threads: number of queued threads [w: number] passed from the queue to the thread pool that have not yet been executed (see TasksWaiting).

© 2005 - 2023 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2023.2 | Data privacy