Discussion

Pre-loading rule set at start up

Hi,
I would like to know if there is an easy way of making sure that after PRPC start, rules would already be loaded in memory without making actual calls to it. Right now, the first calls (about 3 usually for each rule set) takes about 30 seconds and after that the response time is back to less that 1 second.

So, today in production, we make dummy calls to get the rules in memory and the user don't experience this unacceptable response time. Is there any other way of doing this?

Daniel Sauvé

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

June 14, 2011 - 2:45pm

There was a thread 2 years ago about whether it was possible to prime the rules into memory(short of having a script have every accessgroup call every activity in the application).

At the time, I had responded: From the v5.3 What's New: "Through a prconfig.xml setting, the system can pre-populate the rules assembly cache on system start-up with selected rules that were heavily used in previous sessions. This feature is enabled by default and can significantly improve performance at startup.

A subsequent response to this thread asked whether this setting was still available in v6, since there's no mention of it in the prconfig.xml file now.

Any updates, Pega?

Thanks

November 15, 2010 - 11:47am

I would like more information on this topic as well as we have significant performance issues after a server restart.

I am having trouble finding information about this "pre-populate" prconfig.xml setting. I don't see it documented here:
http://pdn.pega.com/DevNet/PRPCv6/TechnologyPapers/Documents/ConfigSettingsReference0601.pdf

Is this feature still available? And if so, what is the prconfig.xml file and/or documentation on this?

August 30, 2009 - 7:26pm

I'd like to know more about this cacheing process as well.

I know from reading the PDN that a snapshot is taken at various times of the day (based on pega core agent) and one at shutdown.

The snapshot records the current state of the cache by writing a record for each rule into the rule logusage table.

My understanding is that this table is used during the cache build when the Pega instance is restarted.

What I need to understand is what criteria is used to determine exactly which rules to load in the cache as the db table contains records for all past snapshots as well. What algorithm (if any) is used?

Or is it always based on the most recent snapshot?
Also, what is the difference between recent, shutdown and manually invoked snapshots? Are they all considered in the logic to determine which rules to cache at next startup?

Is there a way to debug which rules are loaded into the cache without having to extract the csv report from SMA? Our instances restart very early in the morning and by the time we are in the office, there is a good chance that the cache has been affected by users using the system.

I'd like to be able to look at log files showing each entry that has been added to the cache, and hence be able to do a historical comparison against the rule log usage db table to better understand and debug this cache process.

Any ideas and information would be appreciated.

July 27, 2009 - 4:14pm

Daniel wrote: I would like to know if there is an easy way of making sure that after PRPC start, rules would already be loaded in memory without making actual calls to it.

What version on your on? From the v5.3 What's New: "Through a prconfig.xml setting, the system can pre-populate the rules assembly cache on system start-up with selected rules that were heavily used in previous sessions. This feature is enabled by default and can significantly improve performance at startup."

Jon Garfunkel
Lead System Architect, Enterprise Business Systems
Pegasystems

July 27, 2009 - 5:24pm

Hi Jon, thanks for the quick response.:-)

We are running V5.4 sp2 and it is not obvious that the rule set that we are using are loaded on start up. You have to know that we are using many rule sets with many rules each. I would say that we have lots of rules that are "heavily used".

We also use many access groups too, more than 50...

I'll see if we need to increase the value of the following property to more than 20,000
<env name="fua/global/instancecountlimit" value="nnnnn" />.
I suppose the SMA will help determine the right number.

I went through the documentation and I couldn't find what is the key word to look for to set in the prconfig.xml (now I know). I will check to make sure nobody decided to override the default value that sounds very good ;-).

So, we'll do more test and I will keep you posted.

Thanks again.

Daniel Sauvé

November 19, 2010 - 9:36am

What about static assembler? If cache is increased and static assembler is used. Cant this be helpful?

regards,
Abhi

October 10, 2013 - 5:48pm