0% found this document useful (0 votes)
61 views

MID Server Best Practices

Uploaded by

alok kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

MID Server Best Practices

Uploaded by

alok kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

MID Server Best Practices

Whitepaper

Ref: 0002446
Contents

• MID Server Application and Architecture

• Installation

• Performance and Tuning

• Performance Monitoring

© 2024 Serv iceNow, Inc. All Rights Reserv ed 2


Application and
Architecture
MID Servers
• Lightweight Jav a application that runs as a Windows Prod Test Dev
service or UNIX daemon

• Must be hosted on Windows to Discov er Windows &


Unix.

• Set the supported application to the Application you


are using, for example set the Application to
“Discov ery” if using the MID Serv er for Discov ery • Deploy the MID Serv er application on a local driv e on
the host within a unique folder name with no space in
• MID Serv ers cannot be shared between instances it (i.e. c:\Serv iceNow\MID_Serv er_Agent)
• Job is to execute jobs and return the results back to • Redundancy is needed in production env ironments
the instance for processing.
• May be relaxed in sub-production
• It is recommended to cluster ‘like’ MID Serv ers
(cov ered in later slides) • Consider using 2048 MB of JVM memory

• Set the tuning to 125 threads


• Secure outbound only 128/256-bit SSL communication
to your specific Serv iceNow applications • Start planning production deployment
• Clustering, Performance, Access
• Use results from scans during dev elopment
More Information
© 2024 Serv iceNow, Inc. All Rights Reserv ed 4
MID Server Requirements
• Windows Serv er 2012 or greater
▪ .NET Framework 3.5, 4.0, 4.5, 4.6, or 4.7
▪ PowerShell v ersion 3.0 and supports v ersions up to PowerShell 5.1
• Linux Redhat 6+
• Ubuntu 14+
• CentOS 6+

• Standard Hard driv e partition ~40GB


• 8GB Memory
• Quad Core processor 2+ GHz
• 64-bit systems
• Memory required can range from 4GB to 16GB

• Ensure a v alidated connection from the serv ers to be monitored and the MID
serv er
More I nformation
• For Ev ent Management – Check to see if you need the MID Serv er Extension
enabled.

Consider any change requests that


need to be submitted to have the MID
Servers built

© 2024 Serv iceNow, Inc. All Rights Reserv ed 5


Number of MID Servers required
• MID Server performance and system
requirement are driven by multiple factors
including but not limited to:

• The size of the customer infrastructure and


specific function (Capability) M ID Server is
configured to perform.
How many Start
• The ITOM Application you are deploying.
• The number of M ID Servers installed on the MID servers with at
host.
are least 2
• The number of threads per M ID Server.
• The number and nature of other needed?
applications running on M ID Server host.
• Architectural and design enhancements
over ServiceNow releases.
• Consider access, location and availability Leading Practice:
• For Discovery – Use the MID Server Production environment, you should configure
Calculator
at least two MID Servers to support zero-touch
configuration and ensure that a MID Server is
always available if one fails

© 2024 Serv iceNow, Inc. All Rights Reserv ed 6


Clustered MID Servers

• Multiple MID serv ers should be setup


in the network assigned to the same
IP Address ranges.

• When MIDs are setup in Clustered


groups, Serv iceNow automatically
balances the load on Ev ent
Management across the different
MID Serv ers and they act as a
failov er for each other in the ev ent
one MID Serv er goes down.

• Adding an additional MID Serv er is a


good leading practice when there
are large numbers of dev ices (e.g.
more than 500)

© 2024 Serv iceNow, Inc. All Rights Reserv ed 7


Communication Architecture – MID Server
Internal Network

Cloud
Datacenters
Firewall

Network Proxy

Optional

HTTPS Port 443

REST API
Network Gear On-Prem Datacenters
MID Servers
*SSH, SNMP, PowerShell, W inRM,
W MI, CIM, W BEM

*dependent on whether using


patterns vs probes Storage and
Servers Databases
by OS
Printers UPS and PDUs

© 2023 Serv iceNow, Inc. All Rights Reserv ed.


MID Server Application Configuration - Detailed

Product HEAP GB Memory GB CPU cores HDD GB

Discovery 1 4 4 50

Service 1 4 4 50
Mapping

Health Log 1 4 4 50
Analytics
CPG 4 8 4 50

ACC 8 16 8 50

EM/OI 4 12 4 36

© 2024 Serv iceNow, Inc. All Rights Reserv ed 9


Installation
Using the ITOM Guided Setup
Guided Setup – MID Servers

1. Click on a
Task and
complete

2. Assign the
Leading Practice: Task
Use guided setup to step through
the initial configuration. Guided
setup assists you with planning the
roll-out of the product and
performing the basic configuration
3. Mark
to go live.
Complete
• Use the Guided Setup and to Create M ID Servers
• Define necessary M ID server users and roles and create accounts
© 2024 Serv iceNow, Inc. All Rights Reserv ed 11
Performance and
Tuning
Performance Considerations

• The Speed of performance can be controlled by threads and memory

• These increase or decrease resources to the MID Server application

• Example:

While your local discovery may take a few hours to complete perhaps there
is a need to increase that time as it is discovering through a bandwidth-
sensitive network.

This is where threads and memory come into play.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 13


Tuning Threads

• A thread is a thread of execution in a program. The MID Server JVM allows an


application to have multiple threads of execution running concurrently.

• The MID Server default is for 25 threads to be executed at once.

• Increasing this number will increase the number of tasks (discovery probes) that it will
do at any one time speeding up the discovery jobs.

• This can be found in the deployed application in the <agent_dir>\config.xml file

• Further Information
on ServiceNow docs

© 2024 Serv iceNow, Inc. All Rights Reserv ed 14


Java Virtual Machine Memory Size

• The MID Server JVM memory default is 1 GB.

• This configuration can be found in the <MID Server name>\agent\conf\wrapper-


override.conf configuration file.

• Increasing this number will allow the application to allocate itself more memory
resources from the host. This is done in conjunction with increasing the threads as
needed.

• Further Information on ServiceNow docs

© 2024 Serv iceNow, Inc. All Rights Reserv ed 15


Performance Calculation

• There are many factors that determine the calculation, because of the complexity of
this it requires the experience and assistance of ServiceNow Engineers to agree on
the number of MID Servers required.

• A MID server can process about a probe per minute per thread, and there are about
7 probes per device on average.

• Both of those may vary, depending on the mix of devices (for example, it takes more
probes to discover Windows servers than it does for routers) and the speed of your
network communications and MID Server.

• If the IP ranges are unusually large, i.e., 100 or bigger and mostly empty, the MID
server will spend a significant amount of time scanning non-responding IP addresses,
slowing the performance.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 16


Performance Calculation Example
• Suppose you have a location with about 2,500 devices (a mix of servers, network
gear, printers, and workstations) all together. Further suppose that you wanted
Discovery to do its job between 6 pm and midnight on Friday and 3 am on Saturday
each week – a “Discovery window” of 6 hours.

• Below is a rough estimate to see if a single MID server configured to use 25 threads
could achieve this goal.

• Using the rules-of-thumb, discovering 2,500 devices would require about

7 * 2,500 = 17,500 probes

With 25 threads, the MID server can process about 25 probes per minute.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 17


Performance Calculation Example

• Therefore, we can estimate that this work will take:

17,500/25 = 700 minutes, or about 11 hours

However, you need this work to be completed within the allotted window.

• Based on these numbers, you would want to increase the threads by 25 or you can
tune those threads down where network utilization is a concern.

• There are other factors that determine the calculation like OS and type of active
targets in addition to network latency.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 18


Performance
Monitoring
MID Server Performance Monitoring Dashboard

• Monitor the effects of


increased threads and
memory by:

1. Checking the MID Server


dashboard at MID Server >
Dashboard.
2. A pair of charts on the
default dashboard shows
the average CPU and
memory utilization for
each MID Server.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 20


MID Server Performance Monitoring Lists

Get more details on CPU


and memory utilization in
a pair of related lists on
the MID Server form:

ECC Agent Scalar Metric-


>MID Server

ECC Agent Memory


Metric->MID Server

If you're using the default form, you'll need to use Configure > Related Lists to add
these lists to the form

© 2024 Serv iceNow, Inc. All Rights Reserv ed 21


MID Server Performance Monitoring Lists (cont.)

The scalar metric shows the host's minimum, maximum, and average CPU utilization
measured over a 10-minute period.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 22


MID Server Performance Monitoring Lists (cont.)

The memory metric shows the MID Server application's memory utilization measured
over 10-minute periods. In particular:

• Max available bytes - the configured memory allocation for the MID Server as
defined in the wrapper configuration file.

• Max allocated bytes - what the MID Server application has allocated itself from
the configured available bytes.

• Max used bytes - memory resources actively being used by the MID Java Process.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 23


MID Server Performance Monitoring Lists (cont.)

As the MID Server:

• Sits idle there isn’t going to be much


memory consumption

• Is tasked to do work (like Discoveries) the


Max used will start going up taking more
allocated memory.

As more allocated memory gets utilized the


more Java goes into its availability until it
reaches the configured Max available.

© 2024 Serv iceNow, Inc. All Rights Reserv ed 24


Summary
• To get the most out of the MID Server application and host, start by increasing or
decreasing the threads or the number of probes

• As that number increases so will the memory utilization. The more active the MID
Server application, the host will need more of its own resources to manage the
application
• It is key that host performance is monitored as use of the MID server application
increases. It is recommended to keep the host at about 80% total utilization at
full scale for “standard” deployments.

• A base configured MID Server with 8GB of local memory should provide plenty of
available resources to ‘give’ to the MID Server application as you increase threads.

• For cases like Discovery which are impacted by the number of targets to discover,
increasing the amount of work a MID Server is tasked with will increase the network
traffic as you are discovering more probes at a single time.
© 2024 Serv iceNow, Inc. All Rights Reserv ed 25

You might also like