---
sourceDocument: Australia ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/servicenow-platform

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Set MID Server thread use

# Set MID Server thread use {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 Minuten Lesedauer

Change the number of threads used by the MID Server according to performance
requirements. MID Servers which compete with other programs for CPU time can use fewer
threads than the default. MID Servers which need more speed, and have a host computer
powerful enough, can use more threads.

## Vorbereitungen

Role required: admin

|-|
|   |
[ ]

{#t_SetMIDServerThreadUse__table_ckr_vs4_nhb}

## Warum und wann dieser Vorgang ausgeführt wird

The three parameters define the maximum numbers of worker threads that can run
simultaneously in each pool: threads.interactive.max,
threads.expedited.max, and
threads.max. Changing the thread parameters can affect the MID
Server performance.

The interactive thread pool is designed for executing interactive messages including
system commands and heartbeats. They are typically lightweight, so usually there is
no need to change the default value. The expedited thread pool is designed for
executing messages that have higher priority than the standard ones but less than
interactive ones. Unless you have applications that produce a lot of expedited
messages, there is no need to change the default value for
threads.expedited.max.

The standard thread pool is the busiest pool. Most probes are using it and they can
take a lot of system resources such as CPU, memory, and so on. You can set the MID
Server to use as few as five threads without issue. To increase the speed of the MID
Server if the host is powerful enough or lightly loaded with other programs, you can
increase the threads setting.

The threads setting depends on the limitation of the CPU speed, memory, and operating
system of the host machine. You might have to experiment to find the optimal threads
count that works best when the MID Server is busy so it does not exhaust the host
machine's hardware limitations. This means you may have to refine the thread count
to best meet your situation. The following general observations may be useful:

* PowerShell is resource intensive and threads may not scale linearly.
* Most MID Server tasks require file handles to do their job.
  * Windows: On the Windows operating system, file handles are available in a fixed quantity. If you configure too many MID Server threads on a Windows host, the MID Server can consume all the file handles before approaching maximum CPU usage. This situation appears as an Out of file handles error in the MID Server log and indicates that the MID Server is trying to use too many threads.
  * UNIX and Linux: UNIX and Linux hosts have a much different scheme for allocating file handles. Generally, you can increase MID Server thread use on these operating systems until the CPU of the host is overloaded. See your OS documentation for monitoring CPU usage.
  {#t_SetMIDServerThreadUse__ul_cf1_2vd_xp}
* Each thread on the MID Server requires some memory. Exactly how much memory varies considerably from task to task and depends on the equipment being discovered. To increase the number of threads, you might have to [increase the amount of memory](https://servicenow-prod.fluidtopics.net/rVu6TD9zQbdsIOlZ5i18YQ "The MID Server starts with a default JVM memory allocation, but you can modify this setting in the configuration file.") that Java uses. If you configure insufficient memory, an Out of memory error appears in the MID Server log.
* You can set threads.max as high as 200, however, this setting may need to be changed depending on the OS. For example, Windows-based MID Servers running Discovery uses Powershell which is resource intensive. In this case, you may exhaust the CPU power of the host machine with just 50 threads count.

{#t_SetMIDServerThreadUse__ul_db3_ttd_xp}

Follow the steps below to change the `config.XML` file. Alternatively,
use the `threads.max` connection parameter. See [MID Server
Connection parameters](https://servicenow-prod.fluidtopics.net/VYH5xHLIPq1GhC9qbQDc9Q#mid-server-parameters "Parameters control the behavior of a particular MID Server and have lower precedence than MID Server properties.") for more details.

## Prozedur

1. Open the \\agent\\config.xml file using any text editor.
2. Locate the following lines:  

       <!-- MID Server Threads --><parameter name="threads.max" value="25"/>

3. Edit the value.  
   Keep in mind the cautions described above.
4. Save the record.
5. Restart the MID Server service.

