- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 12-31-2021 06:11 AM
In my previous community articles Application Services: How to use them? and Application Services: Tips and Tricks I described basic usage and functionality of Application Services, with some useful tips related mostly to Calculated Application Services [cmdb_ci_service_calculated].
In this article I will focus to the Rome release and what has been improved with regards to Calculated Application Services.
The most important changes are not directly visible but they have major improvement to the instance performance and data accuracy:
- significant performance improvements related to Service Mapping Recomputation job, that - in the worst case scenario with pre-Rome releases - could lead to memory issues of application node(s)
- synchronous population of the CI Association [svc_ci_assoc] table on Application Service change
Performance Improvements
ServiceNow needs to keep service maps up-to-date, and recompute them when needed. With regards to Calculated Application Service it means that when a new relationship is created and/or existing relationship is remove, service map has to be validated and re-build.
This operation is very heavy, especially for very large maps having higher 100's or 1000's of Configuration Items. Recomputation is done by the scheduled job "Service Mapping Recomputation" that is set to "ALL ACTIVE NODES" - there is instance of the job running on every generic or worker node (in case of UI and worker node separation). Moreover, there can be more than 1 job per node, depending on the "glide.service_mapping.recomputation.job_count" property.
With pre-Rome release this job consumed a lot of memory for large maps, and implementation recomputation logic was not optimal. As a result, for large maps, this job was running for a long time. Run time (recalculation of a single large map) could take 30+ minutes.
This job itself could not lead to memory issues, this could happen when it was combined with another heavy job(s) assigned to the same application node. As a result, application node could be extremely slow and users being logged to this node could experience significant performance issues. However users loggded to other nodes would not see any issues at all. That makes the root cause analysis more complicated, as it happens highly randomly, and only subset of users are impacted for limited period of time.
This behavior has been addressed in Rome release, where Service Mapping Recomputation job has been redesigned. As a result there are no high peaks in memory usage caused by this job, as memory operations done previously in memory were migrated directly to SQL queries. This led to both memory consumption improvements as well as significant reduction of the recomputation time.
Based on the tests provided by the DEV team, and confirmed in real environment of a customer I am engaged with (having > 10 000 Calculated Application Services), for large maps (having higher 100's or 1000's of Configuration Items) the calculation time required is reduced by more than 75% (in some cases more than 95%), with no memory issues after Rome upgrade.
Even with those significant performance improvements that allows to use very high amount of Application Services, keep in mind sizing recommendations I have described in Application Services: How to use them?, section "Summary".
Synchronous population of the CI Association
As I explained in the article Application Services: How to use them?, section "What is a CI Association", some features like impact analysis depend on the CI Associations [svc_ci_assoc] table. With the pre-Rome release, this table was populated by a scheduled job that could result in a significant delay, and impact analysis may not be accurate.
Starting with Rome release, population of the CI Association table is synchronous, ensuring that CI Associations are update to date and impact analysis for e.g. Change tickets is accurate. This feature is enabled by default for both new customers and upgrades, and you may verify by checking the system property "sa.svc_ci_assoc.synchronous_population_enabled". Value "true" means that synchronous population is enabled.