Administering SAS BI Dashboard |
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.
The types of content that are cached include:
ranges
indicator definitions
indicator data
dashboards
Previously, with SAS BI Dashboard 4.2, files were stored in the file system and were cached in the memory. Beginning with SAS BI Dashboard 4.3, content files are stored in the SAS Content Server and accessed via the Metadata Server. Because these files are now cached in the middle tier with ehcache, the following benefits are gained:
reduced time required to load content into the dashboard reduced
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-INF directory, 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.
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 reduces the impact on the metadata server.
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.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.