User Preference table clean-up to prevent system performance degradation

Jeff_GWC
Tera Contributor

We recently had some very poor performance with our sub-production instances. So we opened a case with support and they found that we had over 77k User Preferences with my account having over 3.5k. Once I deleted all of my User Preferences (in the sub-production instances) the performance was night and day. I have since gone through and deleted all user preferences tied to inactive users and the performance seems to be back to normal. 

My question and desire is to create a clean-up job so that we can limit our exposure to this issue. I know how to create the clean-up jobs easily enough, but I am not entirely sure what is safe to delete or clean-up within the User Preferences table. 

Here is the document I have been directed to, but it really only says that over a certain number of records you will experience system degradation, but doesn't go into any details about what is safe to clean up and what to leave alone
https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/navigation-and-u...

Any help would be greatly appreciated. 

Thank you,

Jeff

6 REPLIES 6

Mark Roethof
Tera Patron
Tera Patron

Hi there,

While creating such a scheduled job / sys_auto_flush / flow would be easy, I would be careful with it where it concerns active users or ones with system checked. For example it can concern user preferences which you really want to keep. User preferences like for example having the Next Experience UI turned on 🙂

Can you identify why you have such a high amount of user preferences for your user (77K for all users, doesn't sound that bad if you have thousands of users)? Is there something from a certain app causing this? Etc..

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

There isn't anything that really stands out unfortunately and we only have maybe 2k which not all of them log into the system and use it. 

After just going through the list ones that begin with menu. seem to have the most records. 

find_real_file.png

Can you re-share your images? They are not visible now.

Anyway, it's not a strange number of user preferences. Just checked at two customer instances, not much different.

Have you also investigated if it concerned specific user preferences causing the performance?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

I fixed the image, at least I hope so. 

I did not investigate if it concerned a specific user preference as once I cleaned up all of the inactive user ones the system performance improved. 

I am not having the performance issues right now. I may have to wait for awhile and see if we get build up again and do a review at that time. 

I was hoping to create a clean-up job to keep it semi clean so we can hope to avoid the issue in the future.