Configuring WebCache Memory Memory Configuration

10-8 Oracle Fusion Middleware Performance and Tuning Guide Oracle Web Cache to ignore the non-differentiating URL parameter values, so that a single document is cached for different URLs, greatly increasing cache hit rates. Sometimes the content for a set of documents is nearly identical. For example, the documents may contain hyperlinks composed of the same URL parameters with different session-specific values, or they may include some personalized strings in the document text, such as welcome greetings or shopping cart totals. You can configure Oracle Web Cache to store a single copy of the document with placeholders for the embedded URL parameters or the personalized strings, and to dynamically substitute the correct values for the placeholders when serving the document to clients. For more information on multiple version documents, sessions, ignoring URL parameter values, and simple personalization, see Getting Started with Administering Oracle Web Cache in Oracle Fusion Middleware Administrators Guide for Oracle Web Cache. ■ Use redirection to cache entry documents. For some popular site entry documents, such as , that typically require session establishment, session establishment effectively makes the document non-cacheable to all new users without a session. To cache these documents while preserving session establishment, you can either: – Create a blank document that provides session establishment for all initial requests and redirects to the actual popular document. Subsequent redirected requests to the popular document can specify the session, enabling the popular document to be served from the cache. – Use a JavaScript that sets a session cookie for the popular documents. ■ Use partial page caching where possible. Many Web documents, such as pages generated by OracleAS Portal, are composed of fragments with unique caching properties. For these pages, full-page caching is not feasible. However, Oracle Web Cache provides partial page caching using Edge Side Includes ESI. With ESI, you can divide each Web page into a template and multiple fragments that can, in turn, be further divided into templates and lower level fragments. Each fragment or template is stored and managed independently; a full page is assembled from the underlying fragments upon request. Fragments can be shared among different templates, so that common fragments are not duplicated to waste cache space. Sharing can also greatly reduce the number of updates required when fragments expire. Depending on the application, updating a fragment can be cheaper than updating a full page. In addition, each template or fragment can have its own unique caching policies such as expiration, validation, and invalidation, so that each fragment in a full Web page can be cached if possible, even when some fragments are not cached or are cached for a much shorter period of time. ■ Use ESI variables for improved cache hitmiss ratio for personalized pages. Personalized information often appears in Web pages, making them unique for each user. For example, many Web pages contain tens or hundreds of hyperlinks Note: For more information on configuring caching rules for documents requiring session establishment, see Caching and Compressing Content in Oracle Fusion Middleware Administrators Guide for Oracle Web Cache. Oracle Web Cache Performance Tuning 10-9 embedding application session IDs. To resolve this, create your ESI pages with variables. Because variables can resolve to different pieces of request information or response information, the uniqueness of templates and fragments can be significantly reduced. This, in turn, results in better cache hitmiss ratios.

10.6 Optimizing Response Time

If you have not configured the application Web server or the cache correctly, response time may be slower than anticipated. This section summarizes much of the information presented in this chapter. If the application Web server is responding more slowly than expected or if the application Web server is not responding to requests from the cache because it has reached its capacity, check the application Web server and Oracle Web Cache settings. First, check the following: ■ Caching rules: Ensure that you are caching the appropriate objects. Are there popular objects that you should cache but are not caching? Use the Popular Requests page Monitoring Popular Requests to see a list of the most popular requests and to check that those objects are being cached. ■ Priority rankings of the caching rules: Give frequently accessed non-cacheable documents a higher priority than cacheable documents. Give frequently accessed cacheable documents the lowest priority. Note that parsing of caching rules may be resource-intensive if a large number of rules are defined. ■ Compression: If the network is a bottleneck for the client, compressing documents as they are cached can relieve some of the congestion on the network because compressed documents are smaller. Then, check the following: The application Web server configuration, particularly the MaxClients, KeepAlive, KeepAliveTimeout, and MaxKeepAliveRequests settings. The MaxClients limit on the application Web server should be greater than or equal to the application Web server capacity as set through the Oracle Web Cache Manager. The application Web server capacity as set using the Origin Servers page Origin Servers, Sites, and Load Balancing Origin Servers of the Oracle Web Cache Manager. See the Oracle Fusion Middleware Administrators Guide for Oracle Web Cache for information about setting application Web server capacity. Then, if the application Web server is still busier than anticipated, it may mean that the cache cannot process the requests and is routing more requests to the application Web server. Check the following Oracle Web Cache settings in the Oracle Web Cache Manager: ■ The number of cache connections. Check Maximum Incoming Connections in the Resource Limits page Properties Resource Limits. ■ The memory size for the cache. Check Maximum Cache Size in the Resource Limits page Properties Resource Limits. ■ The cache cluster capacity. In a cache cluster, if cluster capacity is too low, a cache may not receive a response for owned content from a peer cache in the specified interval. As a result, the request is sent to the application Web server. Check Capacity in the Clustering page Properties Clustering. See the Oracle Fusion Middleware Administrators Guide for Oracle Web Cache for more information.