The MID server is used by many Servicenow applications. Some of the applications are Discovery, Service Mapping, Orchestration, Event Management, as well as a multitude of integrations. At times, the MID server JVM may use up more CPU than expected in the host server. This KB highlights how to find out what thread in the JVM is using up the resources. Knowing what thread is using up the resources is important to finding out a root cause as well as what team would be best suited to further investigate the issue.
Note: It is expected that the MID server at times will use up 100% of the CPU while the MID server is actually busy. This would usually only be considered a problem if happening for long periods of time and affecting server performance, or if using up resources when not doing any actual work.
Find High CPU Thread
For windows MID servers:
- Get a thread dump of the MID server per https://hi.service-now.com/kb_view.do?sysparm_article=KB0656229
- Install process explorer from https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx
- Open Process Explorer and find the process with high CPU usage
- Righ click on the process and select "Properties"
- Click on the "Threads" tab
- Order the threads by CPU usage and get the TID using up the CPU
- The TID on the previous step is in decimal. The thread dump has TIDs in hexadecimal. Convert the TID to hexadecimal using any appropriate tool. The default calculator for windows can be used
- Open up the wrapper.log and find the thread