Introduction / FirstSpirit Server configuration / Configuration files (FirstSpirit Server) / FirstSpirit Server (fs-server.conf) / Thread Queues

Area: Thread Queues

###########################
# Thread Queues:
# - LOW: Queue for resource-intensive tasks.
# - DEFAULT: Default queue for default tasks.
# - BOUNDED: Bounded queue with rejection strategy.
#  (queueCapacity: -1 = unbounded, 0 = no queueing allowed)
# Attributes:
# - maxRunning   maxmimum numbers of running tasks.
# - queueCapacity queue capacity (-1 = unbounded, 0 = no queueing # allowed).
###########################
ThreadQueue.LOW.maxRunning=2
ThreadQueue.LOW.queueCapacity=128
 
# if left empty the value is set to (#cores * 6)
ThreadQueue.DEFAULT.maxRunning=
# if left empty the value is set to (#cores * 20)
ThreadQueue.DEFAULT.queueCapacity=
 
# if left empty the value is set to (#cores * 6)
ThreadQueue.BOUNDED.maxRunning=
# if left empty the value is set to (#cores * 16)
ThreadQueue.BOUNDED.queueCapacity=

The ExecutionManager, which manages a multitude of different classified queues (see ExecutionManager), is responsible for executing tasks. Some of the queues can limit the number of active tasks through the use of parameters. For queues classified as BOUNDED, the queue capacity can also be limited.

ThreadQueue.LOW.maxRunning

Of the resource-intensive tasks within this queue, only a few should be run concurrently. The number of tasks that may be run at the same time can be configured using the maxRunning parameter (default value is 2 threads).

ThreadQueue.DEFAULT.maxRunning

The number of this queue's tasks that can be run concurrently can also be limited using the maxRunning parameter. Since these tasks are not as resource-intensive, the value can be higher than that defined in ThreadQueue.LOW.maxRunning (default value is 25 threads).

ThreadQueue.DEFAULT.queueCapacity

The capacity of a queue classified as DEFAULT can be limited.

ThreadQueue.BOUNDED.maxRunning

The queue classified as BOUNDED can be configured using two parameters. The parameter maxRunning can be used to limit the number of active tasks (default value is 25 threads).

ThreadQueue.BOUNDED.queueCapacity

In addition, the capacity of a queue classified as BOUNDED can be limited using the parameter queueCapacity. If the value configured under queueCapacity is attained, additional tasks from the server are rejected. This means that when the server is under a heavy load, only a certain number of tasks is placed in the queue (default value is 50 tasks) (of that number, those defined under maxRunning are processed directly). All other tasks are rejected for the time being and are transferred to an internal rejection strategy.

If no explicit values are specified for the parameters

  • ThreadQueue.DEFAULT.maxRunning
  • ThreadQueue.DEFAULT.queueCapacity
  • ThreadQueue.BOUNDED.maxRunning
  • ThreadQueue.BOUNDED.queueCapacity

values that are dependent on the number of available processors are used automatically.

Important The values of the parameters ThreadQueue.LOW.maxRunning and ThreadQueue.LOW.queueCapacity are not dependent on the number of cores and cannot be overwritten with “empty” values.
Important The value for ThreadQueue.<name>.maxRunning must be smaller than the value for ThreadPool.maxSize.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.10 | Data privacy