Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Anabatic Technologies Tbk Pt
ID
Last activity: 2 Aug 2023 4:00 EDT
Manually Recompile any GOS
Hi All,
We need to manually recompile GOS on the PROD environment because we need more performance for our API when generating the offer.
It is possible to switch off automatic recompilation by editing the Pega-DecisionEngine.decision/strategy/cacheGOSProgram dynamic system setting. By default, the setting is set to SMART_CACHE. To enable manual recompilation of globally optimized strategies, change the setting value to STATIC_CACHE.
We can manually recompile any GOS on the Configure -> Decisioning -> Decisions -> Strategy Optimizations page in Dev Studio. And we need to do it when GOS is in the open ruleset.
We have a question regarding this:
- What is the difference between manual recompile and automatic recompile (if the config is SMART_CACHE)?
- Why can the automatic recompile (SMART_CACHE) run even though the GOS is in the ruleset, which is locked?
Could someone please provide insights about this? Thank you.
***Edited by Moderator Marije to change Type from Discussion to Question***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 6 Jun 2023 22:57 EDT
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@MillieB16852873 @AnggunMD here is the response given by our support engineer.
If you require further follow-up I suggest you log a support incident to discuss this further with our support team:
"
Here are the answers to GOS queries:
1. What is the difference between manual recompile and automatic recompile (if the config is SMART_CACHE)?
@MillieB16852873 @AnggunMD here is the response given by our support engineer.
If you require further follow-up I suggest you log a support incident to discuss this further with our support team:
"
Here are the answers to GOS queries:
1. What is the difference between manual recompile and automatic recompile (if the config is SMART_CACHE)?
[Pega] As Globally Optimized Strategy (GOS) inline all the underlying rules and generates a global SSA program, GOS needs to listen to changes of all the underlying rules. If any inline rule is checked out/saved/checked in/discarded or a new version of it is imported into the system, the generated GOS program will be ditched and a new one will be generated when then GOS is invoked again. This is the default behavior of GOS and the whole listen-throw away-regenerate cycle happens automatically behind the scenes. GOS program generation takes time. Thus users can choose to turn off the GOS program auto re-compile (by tuning a Dynamic System Settings, aka DSS) and then take care of manually recompiling the GOS's they are interested in. In that case, the GOS program will not re-compile automatically if any inline rules are updated in the environment. Instead, the user needs to trigger it manually by saving the GOS rule or going to "Strategy Optimizations" landing page and clicking on "Recompile". Note: Only disable automatic recompilation on environments where rules are not frequently updated and performance is important, for example, on production environments. And whenever you propagate the changes manually, and then recompile GOS rules on the destination environment. The steps are available below; which you need to test in the UAT environment thoroughly before implementing into Production. https://docs-previous.pega.com/decision-management/86/frequently-asked-questions-about-globally-optimized-strategies https://docs-previous.pega.com/decision-management/86/understanding-globally-optimized-strategies It is Developer's responsibility to import GOS along with its inline rules to the destination system or trigger GOS re-compile manually on the destination system. This is especially important if GOS auto-recompilation is turned off on the destination system.
2. Why can the automatic recompile (SMART_CACHE) run even though the GOS is in the ruleset, which is locked?
[Pega] The automatic recompile (SMART_CACHE) ; as explained in #1 above, it is managed internally within our code unlike Manual compilation.
Disabling the GOS recompile in Production would require regular monitoring / manual compiling of the strategy every time an update is applied. Not something we generally recommend as a long term solution.
We would also like to know your upgrade plans.
Kindly note that the GOS compilation has been enhanced in latest Pege release. i.e. Pega 8.8.3. where it enhances the Pega's REST Service's Circuit Breaker (aka 'service SLA with fallback activity') logic to allow it to start in open mode (instead of closed, which is the current default). When the Circuit Breaker starts in open mode (a.k.a. broken) the initial requests will execute the fallback activity allowing the node to do it's initial warmup (i.e. classloading, rule compilation) before it starts running the primary activity. After the initial retry interval elapses a single request is allowed to execute the primary activity. When it completes successfully, Circuit Breaker closes and all traffic is routed to the primary activity. If you upgrade to Pega 8.8.3., you will be able to benefit out of this enhancement."
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@AnggunMD can you confirm if you also checked our latest documentation Understanding globally optimized strategies and Frequently asked questions about globally optimized strategies?
I will try to find the relevant SME to answer your question.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Anabatic Technologies Tbk Pt
ID
Hi @MarijeSchillern, Yes, we also checked out the latest document.
Thank you very much. We will wait for updates from you.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Anabatic Technologies Tbk Pt
ID
Hi @MarijeSchillern and all, Can you guys please help us with this?
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@AnggunMD I have been unsuccessful in getting help internally.
@kapov @BURTA would you be able to help provide some input to this question?
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@AnggunMD I can see that you posted a support Incident INC-A619 for this question some days after posting it here on the forum. Please could you mention that when posting questions - this helps us work together with other teams. I have linked the INC here.
I will leave our support team to answer your question as our SME have not yet responded here on the forum.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Milliemx
US
@MarijeSchillernSeeking assistance with this, can you help us, please?
Accepted Solution
Updated: 6 Jun 2023 22:57 EDT
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@MillieB16852873 @AnggunMD here is the response given by our support engineer.
If you require further follow-up I suggest you log a support incident to discuss this further with our support team:
"
Here are the answers to GOS queries:
1. What is the difference between manual recompile and automatic recompile (if the config is SMART_CACHE)?
@MillieB16852873 @AnggunMD here is the response given by our support engineer.
If you require further follow-up I suggest you log a support incident to discuss this further with our support team:
"
Here are the answers to GOS queries:
1. What is the difference between manual recompile and automatic recompile (if the config is SMART_CACHE)?
[Pega] As Globally Optimized Strategy (GOS) inline all the underlying rules and generates a global SSA program, GOS needs to listen to changes of all the underlying rules. If any inline rule is checked out/saved/checked in/discarded or a new version of it is imported into the system, the generated GOS program will be ditched and a new one will be generated when then GOS is invoked again. This is the default behavior of GOS and the whole listen-throw away-regenerate cycle happens automatically behind the scenes. GOS program generation takes time. Thus users can choose to turn off the GOS program auto re-compile (by tuning a Dynamic System Settings, aka DSS) and then take care of manually recompiling the GOS's they are interested in. In that case, the GOS program will not re-compile automatically if any inline rules are updated in the environment. Instead, the user needs to trigger it manually by saving the GOS rule or going to "Strategy Optimizations" landing page and clicking on "Recompile". Note: Only disable automatic recompilation on environments where rules are not frequently updated and performance is important, for example, on production environments. And whenever you propagate the changes manually, and then recompile GOS rules on the destination environment. The steps are available below; which you need to test in the UAT environment thoroughly before implementing into Production. https://docs-previous.pega.com/decision-management/86/frequently-asked-questions-about-globally-optimized-strategies https://docs-previous.pega.com/decision-management/86/understanding-globally-optimized-strategies It is Developer's responsibility to import GOS along with its inline rules to the destination system or trigger GOS re-compile manually on the destination system. This is especially important if GOS auto-recompilation is turned off on the destination system.
2. Why can the automatic recompile (SMART_CACHE) run even though the GOS is in the ruleset, which is locked?
[Pega] The automatic recompile (SMART_CACHE) ; as explained in #1 above, it is managed internally within our code unlike Manual compilation.
Disabling the GOS recompile in Production would require regular monitoring / manual compiling of the strategy every time an update is applied. Not something we generally recommend as a long term solution.
We would also like to know your upgrade plans.
Kindly note that the GOS compilation has been enhanced in latest Pege release. i.e. Pega 8.8.3. where it enhances the Pega's REST Service's Circuit Breaker (aka 'service SLA with fallback activity') logic to allow it to start in open mode (instead of closed, which is the current default). When the Circuit Breaker starts in open mode (a.k.a. broken) the initial requests will execute the fallback activity allowing the node to do it's initial warmup (i.e. classloading, rule compilation) before it starts running the primary activity. After the initial retry interval elapses a single request is allowed to execute the primary activity. When it completes successfully, Circuit Breaker closes and all traffic is routed to the primary activity. If you upgrade to Pega 8.8.3., you will be able to benefit out of this enhancement."
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Anabatic Technologies Tbk Pt
ID
Hi @MarijeSchillern and all, I apologize for the late response and thank you for your support.
Thanks & regards, Anggun
-
Marissa Rogers Marije Schillern