Hi @ANU ,
You are also correct about Cookdown - it does not work for the different enviroments, it can only work for one individual MG. In order for it to work, the same parameters need to be passed to the data source, which is of course impossible for different env. Thiss also explained here:
Operations Manager Management Pack Authoring - Cookdown
https://social.technet.microsoft.com/wiki/contents/articles/15218.operations-manager-management-pack-authoring-cookdown.aspx#Criteria_for_Cookdown
Whaat George mentioned above is also true - if the Health Service reaches certian threshold it will restart automatically in order to free up resoruces. This was a known issue on SCOM 2016 and I alslo blogged about it:
SCOM 2016 – Agent (Health Service) high CPU utilization and service restart
https://social.technet.microsoft.com/wiki/contents/articles/52853.scom-2016-agent-health-service-high-cpu-utilization-and-service-restart.aspx
what you can do to prevent this if your agents are heavily loaded and are restarting is to increase the agent thresholds even further:
Health Service Handle Count Threshold
Health Service Private Bytes Threshold
Monitoring Host Handle Count Threshold
Monitoring Host Private Bytes Threshold
Please see the refence to Kevin Holmans blog post in the article I wrote.
Besides this there are no other known way of doing perfomance optimizations on your aagents. This is because their performance highlyy depends on how all the MPs are written (especially the custom ones) and how Targeting and Overrides are handled in your environment.
I hope I could clarify this for you!
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Stoyan Chalakov