Cache settings in Mashery Local 5.x

Cache settings in Mashery Local 5.x

book

Article ID: KB0073952

calendar_today

Updated On:

Products

TIBCO Cloud API Management - Local Edition

Description

In ML4.x, Instance Management -> Configuration cache controls the service pool cache.

services_cachesize in ML5.x is the service pool that is exposed with instance management in ML 4.x
The configured endpoints are serviced using Service Pool which is “services_cachesize” in ML 5.x

Issue/Introduction

This article provides inputs on setting cache sizes in Mashery Local.

Environment

All Supported Platforms

Resolution

#Option-1
The CLI command "clustermanager set config" can be used to change the cache pool sizes.

Here is the doc chapter that lists the relevant properties:
https://docs.tibco.com/pub/mash-local/5.3.0/doc/html/GUID-9A97433C-E572-401B-A775-0632E72D14FE.html for available cache properties.

For example, to set the property count_cachesize to 512 MB, use the following command:
clustermanager set config --componentId <cache_component_id> --componentType cache --prop count_cachesize --value 512

Here is the doc chapter that has info on clustermanager CLI command:
https://docs.tibco.com/pub/mash-local/5.3.0/doc/html/GUID-5911C171-806C-4788-951A-6F4D711FA419.html

The above command sets the property value and restarts the cache process running in the Cache TML container/pod.
This has similar effect as re-deploying the pod. The cached data will be reloaded in cache after the pod redeployment.

The below commands to check the before and after values:
1) cat  /opt/mashery/containeragent/resources/properties/tml_cache_properties_final.json
2) ps -ef | grep memcached

This change is effective for existing cache container/pod and does not need explicit redeployment.
If it is redeployed, the values from the Manifest folder would be effective.

#Option-2
set the values in <manifest_folder>/tml_cache_properties.json and all redeployments will use the values from this file.