Project and Portfolio Management Practitioners Forum
cancel

Survey to PPM Admins & Partners about your PPM Cache management practices

Highlighted
Etienne_Canaud
Outstanding Contributor.

Survey to PPM Admins & Partners about your PPM Cache management practices

Hi All,

 

I'm part of PPM R&D and I'd like to get some input from PPM Admins and Partners around here regarding your practices with PPM Cache management:

 

1) Do you sometimes run kRunCacheManager.sh in order to clear a specific cache? If yes, which one(s), how often, and why? Do you call it manually or in an automated way (script, jsp, command step, ...)

 

2) Do you run "kRunCacheManager.sh A" to flush all caches? If yes, how often, and why? Do you call it manually or in an automated way (script, jsp, command step, ...)

 

3) Do you use the undocumented special command "ksc_flush_cache"? If yes, do you use it to flush a whole cache (if yes, which ones and why) or do you use it to flush a specific entity in a specific cache?

 

 

Kind Regards,

Etienne.

9 REPLIES
Utkarsh_Mishra
Acclaimed Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

Well in sevaral project depending on requirement we use all the three, along with this we even modifed cache.conf to stop cacheing certain entities.

 

For example

 

kRunCacheManager.sh - most of the time we call it for clearing request cahce and call it using workflow execution step command.

 

kRunCacheManager.sh A- manuall execute it once we perform bacth update from DB (mainly demand/project request)

 

ksc_flush_cache - used it for budget and benefits

 

cache.conf - stop to keep table componet cache, so that the rule updates are directly visible on the request form on SAVE event

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Etienne_Canaud
Outstanding Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

Thanks for the input Utkarsh.
Did you notice any performance impact when disabling some cache or repeatedly flushing a cache from a workflow step?
Utkarsh_Mishra
Acclaimed Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

With ksc_flush_cache and kRunCacheManager [option] does NOT impact much on performance.

 

But yes I had observed performance issue if we frequently use kRunCacheManager.sh  A.

 

Well by updating last_updated_date and last_updated_by resolves the cache issue, except for Request Type :(

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
AlfredoMonasi
Honored Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

H Etienne,

 

We use kRunCacheManager.sh inside workflow execution step command after calling some SP to update the data.

 

We use kRunCacheManager.sh A mannualy after doing some inserts/updates/delete in the DB.

 

I never used before ksc_flush_cache

 

Regards,

 

Alfredo

Jason Nichols K
Acclaimed Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

I've used the kRunCacheManager.sh script most in custom integration report types that run on a schedule.  I have also written some custom workflow execution steps that update data, usually to a related request or package, and will call the script after the updates are performed.  I very nearly always use the A option to make sure that I don't miss anything.

 

I have known about the ksc_flush_cache special command, but I haven't used it.

 

As far as performance goes, I haven't noticed anything to cause me to change from the A parameter to calling out a specific cache to flush. 

 

Jason

Etienne_Canaud
Outstanding Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

Hi Jason,

 

I'd advise to always flush as little part of the cache as possible. Flushing all caches (A option) will result in ALL data having to be (re)loaded from the database afterwards, so calling it regularly might severely degrade performance right after the call, especially if the system is already experiencing heavy database load.

 

The ideal solution would be to only flush the specific entity that has been modified outside of PPM (for example, only remove request 12345 from cache when it's modified rather than flush the whole requests cache). However, this is only possible with ksc_flush_cache, and it cannot be done on all PPM caches (yet).

 

Regarding the information from Utkarsh about fixing his problem by updating last_updated_date field in DB, it's because the Request cache has a staleness check implemented: If you check in cache.conf, you have this line:

 

cache.request.stalenessCheck = com.kintana.crt.server.RequestDBAdapterImpl

 

Staleness check means that before getting an object from the cache, PPM will issue a single SQL query to verify whether the last_update_date value is the same in the DB and in the cached object. If it's different, we'll reload the whole object from DB, but if it's the same, we'll use the cached object.

The advantage is that if you update the object directly in DB we will detect it in PPM; the drawback is that getting an object from the cache still requires one (albeit simple) SQL query, which does have some performance cost.

 

Utkarsh, if you want to have the same behavior for request types, you can try to implement a staleness check java class for request type, and set it in cache.conf. The interface to implement with a staleness check Class is com.kintana.core.cache.StalenessCheck (you can use your favorite Java decompiler on knta_classes.jar to get its source code).

 

The bad news is that Table components cache cannot be configured in cache.conf so you cannot use the same trick as there's no staleness check possible for entities configured in tune.conf (yet?).

 

Thanks,

Etienne.

Utkarsh_Mishra
Acclaimed Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

Hi Etienne,

 

You are right, we change tune.conf for stopping TC cache..

 

Thanks for correcting it... :)

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
skbd
Super Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

1) No - I always flush all caches when I need to.

2) Yes, as needed.  I created a report to execute this from.

3) No

Erik Cole
Acclaimed Contributor.

Re: Survey to PPM Admins & Partners about your PPM Cache management practices

Hi,

 

1) Only when we make updates to a table without a last_update_date column. It's very rare.

 

2) No

 

3) No

 

We don't much have problems with the cache. What bites me more often is making changes to the menu items via menu.xml. It seems like no matter what we do, we get mixed results on different nodes/systems/users/browsers until a day or two has gone by and the new menu items "settle in". Maybe it's the browser? Is there a way to configure PPM to tell browsers to "expire" the menu object so that they will pick up the new one sooner?