Improving Performance of with Content Caching

Content Caching with the Ehcache Feature

SAS BI Dashboard 4.3 supports an open-source caching feature called Ehcache that is commonly used for Java applications. The Ehcache feature is turned on by default and enables the caching of content. This type of caching can expedite the performance of SAS BI Dashboard because the cached content can be reused by the Web application, and caching alleviates the proportion of response time.
In rare instances, when an environment has extraordinary characteristics such as unusually high number of users or queries, the values for the Ehcache parameters can be fine-tuned. However, in almost all environments, the parameters for Ehcache do not require any special values other than the default values that are already set.
The types of content that are cached include:
  • ranges
  • indicator definitions
  • indicator data
  • dashboards
Content files for SAS BI Dashboard 4.31 are stored in the SAS Content Server and accessed via the Metadata Server. The following benefits are gained by caching files in the middle tier with Ehcache:
  • reduced time required to load content into the dashboard
  • reduced impact on other servers
  • improved response time
  • improved performance with increased scalability
The speed in dashboard performance mostly depends on how much of the content is reused. If the content is used only once, no speed is gained. If the content is reused repeatedly, the gain in speed can be significant.
The ehcache.config file, which is located in the SAS-configuration-directory\Lev1\Web\Staging\exploded\sas.bidashboard4.3.ear\sasbidashboard.war\WEB-INFdirectory, contains the parameters and values for content caching.
Here is an excerpt from the file that shows the default values for three important caches:
<cache name="modelRequest"
eternal="true"
overflowToDisk="false"
diskSpoolBufferSizeMB="1"
maxElementsinMemory="30000"
maxElementsOnDisk="0"
memoryStoreEvictionPolicy="LRU"
/>

<cache name="modelRequestHit"
eternal="true"
overflowToDisk="false"
diskSpoolBufferSizeMB="1"
maxElementsinMemory="30000"
maxElementsOnDisk="0"
memoryStoreEvictionPolicy="LRU"
/>

<cache name="modelRequestSize"
eternal="true"
overflowToDisk="false"
diskSpoolBufferSizeMB="1"
maxElementsinMemory="30000"
maxElementsOnDisk="0"
memoryStoreEvictionPolicy="LRU"
/>
The following rules and guidelines apply to the modelRequest, modelRequestHit, and modelRequestSize caches:
  • The cache accommodates 30,000 data models in memory.
  • The eternal attribute, which is set to true, should not be changed.
  • The values for overflowToDisk, maxElementsInMemory, and maxElementsOnDisk attributes can be modified. However, the default values for these attributes meet the needs of almost all environments. Therefore, you should not need to modify these values.
For more information about Ehcache, see http://ehcache.org.

Modify the Cache Values in the ehcache.config File

The default values in the ehcache.config file are sufficient for almost all environments. In very rare cases, you might have a need to modify the default values in the ehcache.config file that controls content caching. For example, your environment might have exceptionally large numbers of dashboard objects such as ranges, dashboards, and indicators, or indicator data. In such cases, you might consider increasing the size of certain caches.
If your environment has unusually high dashboard activity whose performance is limited by the metadata server's CPU, you might be able to improve performance by increasing the duration between cache refreshes. This change reduces the impact on the metadata server, but it can increase the load on the middle tier..
To modify the ehcache.config file, unarchive the EAR and WAR file for the ehcache.config file. Then, modify the file, edit the appropriate values, and save the file in the original folder where it resides. Another alternative is to extract the ehcache.config file to a folder, and add a JVM argument that points to the extracted ehcache.config file.
For information about exploding EAR files, see Working with Exploded EAR Files in a Development Environment in SAS Intelligence Platform: Middle-Tier Administration Guide.