Have you ever increased the threads on MID server for Discovery?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 05:31 AM - edited 08-03-2025 07:29 AM
Have you ever increased the threads on MID server in Discovery projects for discovering the CI's?
If yes, what made you to increase the threads?
and what values did you set for 'wrapper.java.maxmemory' and threads.max? (anything else you increased?)
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 07:31 AM
@AJ-TechTrek It would be great if you can respond 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2025 10:50 PM
We encountered issues with our MID Server going down due to high memory consumption. Initially, we attempted to reduce the number of threads before allocating more memory. However, this led to the MID Server taking significantly longer to complete its tasks.
While increasing the thread count can allow the MID Server to handle more jobs in parallel, it can also negatively impact overall performance if not managed properly.
A better approach is to calculate the number of IPs you need to discover and determine how many MID Servers you can deploy accordingly. ServiceNow provides a MID Server Capacity Calculator, which is available in the Discovery slide deck on Now Create.
I hope this helps. You can also refer to the official documentation here:
🔗 Set MID Server Thread Use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 07:36 AM
@Pratiksha Thats interesting to know!
So you went with adding more MID servers vs increasing the threads and JVM?
Also when you say " it can also negatively impact overall performance if not managed properly." ---- can you share further details on this. My understanding was, its just about increasing the threads and JVM for quicker discovery.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2025 10:53 PM
We handled this differently for two clients based on their infrastructure constraints:
For Client A, we placed the MID Server close to the target CIs and added additional MID Servers to distribute the load. This helped balance the discovery workload and improved performance without overloading any single MID Server. Increasing the thread count worked well here because the additional resources could support it.
For Client B, the client was not open to adding more RAM or deploying additional MID Servers. In this case, we had to reduce the number of threads to avoid overwhelming the existing server. While this did increase the discovery time, it ensured stability. We also fine-tuned the JVM to make the most of the available memory, which provided some optimization within the existing setup.
Regards,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2025 07:59 AM
@Pratiksha thanks a lot for sharing those insights.
For client A, may I know what values you set for 'wrapper.java.maxmemory' and threads.max?
and how did you decide on those numbers.