Product documentation Docs
    • English
    • Deutsch
    • 日本語
    • 한국어
    • Français
  • More Sites
    • Now Community
    • Developer Site
    • Knowledge Base
    • Product Information
    • ServiceNow.com
    • Training
    • Customer Success Center
    • ServiceNow Support Videos
  • Log in

Product documentation

  • Home
How search works:
  • Punctuation and capital letters are ignored
  • Special characters like underscores (_) are removed
  • Known synonyms are applied
  • The most relevant topics (based on weighting and matching to search terms) are listed first in search results
Topics are ranked in search results by how closely they match your search terms
  • A match on the entire phrase you typed
  • A match on part of the phrase you typed
  • A match on ALL of the terms in the phrase you typed
  • A match on ANY of the terms in the phrase you typed

Note: Matches in titles are always highly ranked.

  • Release version
    Table of Contents
    • Now Platform capabilities
Table of Contents
Choose your release version
    Home Paris Now Platform Capabilities Now Platform capabilities MID Server Configuring MID Servers Set MID Server thread use

    Set MID Server thread use

    • Save as PDF Selected topic Topic & subtopics All topics in contents
    • Unsubscribe Log in to subscribe to topics and get notified when content changes.
    • Share this page

    Set MID Server thread use

    The three parameters: threads.interactive.max, threads.expedited.max, and threads.max define the maximum numbers of worker threads that can run simultaneously in each pool. 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.

    Before you begin

    Role required: admin
    Setup indicator for configuration phaseEnsure that the MID Server can connect to elements inside and outside your networkDownload and install the MID Server on a Linux or Windows hostConfigure your MID ServerConfigure MID Server securityEnsure that the MID Server can connect to elements inside and outside your networkDownload and install the MID Server on a Linux or Windows hostConfigure your MID ServerConfigure MID Server security

    About this task

    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.
    • 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 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.

    Follow the steps below to change the config.XML file. Alternatively, use the threads.max connection parameter. See MID Server Connection parameters for more details.

    Procedure

    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.
    Related concepts
    • MID Server Configuration Home
    • MID Server Reference
    Related reference
    • MID Server Issues Home

    Tags:

    Feedback
    On this page

    Previous topic

    Next topic

    • Contact Us
    • Careers
    • Terms of Use
    • Privacy Statement
    • Sitemap
    • © ServiceNow. All rights reserved.

    Release version
    Choose your release version

      Set MID Server thread use

      • Save as PDF Selected topic Topic & subtopics All topics in contents
      • Unsubscribe Log in to subscribe to topics and get notified when content changes.
      • Share this page

      Set MID Server thread use

      The three parameters: threads.interactive.max, threads.expedited.max, and threads.max define the maximum numbers of worker threads that can run simultaneously in each pool. 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.

      Before you begin

      Role required: admin
      Setup indicator for configuration phaseEnsure that the MID Server can connect to elements inside and outside your networkDownload and install the MID Server on a Linux or Windows hostConfigure your MID ServerConfigure MID Server securityEnsure that the MID Server can connect to elements inside and outside your networkDownload and install the MID Server on a Linux or Windows hostConfigure your MID ServerConfigure MID Server security

      About this task

      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.
      • 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 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.

      Follow the steps below to change the config.XML file. Alternatively, use the threads.max connection parameter. See MID Server Connection parameters for more details.

      Procedure

      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.
      Related concepts
      • MID Server Configuration Home
      • MID Server Reference
      Related reference
      • MID Server Issues Home

      Tags:

      Feedback

          Share this page

          Got it! Feel free to add a comment
          To share your product suggestions, visit the Idea Portal.
          Please let us know how to improve this content

          Check any that apply

          To share your product suggestions, visit the Idea Portal.
          Confirm

          We were unable to find "Coaching" in Jakarta. Would you like to search instead?

          No Yes
          • Contact Us
          • Careers
          • Terms of Use
          • Privacy Statement
          • Sitemap
          • © ServiceNow. All rights reserved.

          Subscribe Subscribed Unsubscribe Last updated: Tags: January February March April May June July August September October November December No Results Found Versions Search preferences successfully updated My release version successfully updated My release version successfully deleted An error has occurred. Please try again later. You have been unsubscribed from all topics. You are now subscribed to and will receive notifications if any changes are made to this page. You have been unsubscribed from this content Thank you for your feedback. Form temporarily unavailable. Please try again or contact  docfeedback@servicenow.com  to submit your comments. The topic you requested does not exist in the release. You were redirected to a related topic instead. The available release versions for this topic are listed There is no specific version for this documentation. Explore products Click to go to the page. Release notes and upgrades Click to open the dropdown menu. Delete Remove No selected version Reset This field is required You are already subscribed to this topic Attach screenshot The file you uploaded exceeds the allowed file size of 20MB. Please try again with a smaller file. Please complete the reCAPTCHA step to attach a screenshot
          Log in to personalize your search results and subscribe to topics
          No, thanks Login