- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
2 hours ago
< Previous Article | Next Article > | |
Performance Best Practices for Coding Comma Separated Lists | Best Practice for Building Efficient Queries |
Overview
This guide is written by the ServiceNow Technical Support Performance team (All Articles). We are a global group of experts that help our customers with performance issues. If you have questions about the content of this article we will try to answer them here. However, if you have urgent questions or specific issues, please see the list of resources on our profile page: ServiceNowPerformanceGTS
This articles discusses performance considerations regarding the use of ServiceNow System Properties. There are two main things we want to call out.
NOTE: When creating a property, you should almost always use ignore_cache=true |
NOTE: Never use System Properties table for state data |
How System Properties Work
System Properties are for storing settings that control how various aspects of ServiceNow behave. For example, you can have a System Property to control if verbose logging should be turned on or off for a Scoped Application. ServiceNow allows customers to Create a new System Property [official ServiceNow docs].
In the backend, System Properties are stored in a table named sys_properties. To avoid frequent calls to the database, System Properties are stored in the application tier in a cache. Since the application tier is comprised of multiple "nodes" each node must have it's own version of this cache. In order to keep the cache's in synch, all the caches must be flushed whenever a property is changed (i.e., created, updated, deleted). This is known as a cache flush.
Ignore Cache
There is a field on the sys_properties table called Ignore Cache. This field controls if ServiceNow will flush the entire system cache or just the System Properties specific cache. So, regardless of if you set ignore_cache to true or false, ServiceNow will still need to do a cache flush across all nodes. Flushing the Property specific cache is less impactful but it is still potentially very dangerous and has caused full outages for many customers if implemented incorrectly.
| Regardless of if you set ignore_cache to true or false, ServiceNow will still need to do a cache flush across all nodes.
If 'ignore cache' is set to false
When you change a System Property, it will cause a system-wide cache flush. This usually leads to mild performance degradation for anywhere from 5 to 30 minutes. In some very rare cases, this may result in severe performance degradation with average transaction response times increasing twofold or even threefold. The degradation experienced is very similar to that of applying an Update Set. You should take the same level of caution when changing a Glide Property that has 'ignore cache' set to false as you do when applying an Update Set. If 'ignore cache' is set to false and Glide Properties are changed repeatedly (10 times in 10 minutes, for example) this will cause severe degradation.
If 'ignore cache' is set to true
When you change a Glide Property, it will still cause a cache flush, but it will only flush the cache that is specific to Glide Properties. This cache flush is less impactful than the system-wide cache flush, but if done frequently can still lead to significant performance degradation. For example, one customer was changing Glide Property values about 15 times a minute and this caused ongoing, system-wide response degradation of 20-30%. Another customer was changing Glide Property values 1,000 times a minute and this caused a full system outage.
< Previous Article | Next Article > | |
Performance Best Practices for Coding Comma Separated Lists | Best Practice for Building Efficient Queries |