Hardware Resources Optimizing Hardware Resources

10-6 Oracle Fusion Middleware Performance and Tuning Guide generate a response within that time, Oracle Web Cache sends a network apology page to the browser. Usually, this value should be equal to the response time of the slowest document served by the application Web Server. If the value is too low, long-running requests can timeout before the response is complete. If the value is too high and the application Web server hangs for some reason, it can take longer for Oracle Web Cache to failover to another application Web server. Set this value in the Network Timeouts page Properties Network Timeouts. For the application Web server, check the values of the following settings in the application Web servers configuration file httpd.conf. These particular parameter names are specific to the Oracle HTTP Server. ■ KeepAlive Whether to allow persistent connections. Persistent connections allow a client to send multiple sequential requests through the same connection. Make sure KeepAlive is enabled. This can improve performance because the connection is set up only once and is kept open for subsequent requests from the same client. ■ KeepAliveTimeout: The time a connection is left open to wait for the next request from the same client. If requests are primarily from Oracle Web Cache, you can set this value fairly high. A reasonable value is 30 seconds. ■ MaxKeepAliveRequests: The maximum number of requests to allow during a persistent connection. Set to 0 to allow an unlimited number of requests. ■ MaxClients: The maximum number of clients that can connect to the application Web server simultaneously. If KeepAlive is enabled for the application Web server, you may require more concurrent httpd server processes, and you may have to set the MaxClients directive to a higher value. If client requests have a short response time, you may be able to improve performance by setting MaxClients to a lower value. However, when the MaxClients value is reached, no additional processes can be created, causing other requests to fail. 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. For the operating system, check the TCP time-wait setting. This setting controls the amount of time that the operating system holds a port, not allowing new connections to use the same port. On the Linux operating system, validate the value of procsysnetipv4tcp_ fin_timeout. On the Solaris Operating System, check the tcp_time_wait_ interval setting, using the following command: ndd -get devtcp tcp_time_wait_interval. On Windows, check the value of TcpTimeWaitDelay in the following key in the registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters This setting is usually only an issue during stress testing, if you continuously open more TCPIP connections from one client computer. In this situation, lower the Oracle Web Cache Performance Tuning 10-7 TCP time-wait setting. In real world deployments, this is rarely an issue because it is unlikely that a single client can generate a huge number of connections.

10.4 Optimizing Platform Connections

■ UNIX Connections ■ Windows Connections

10.4.1 UNIX Connections

On most UNIX platforms, each client connection requires a separate file descriptor. The Oracle Web Cache server attempts to reserve the maximum number of file descriptors when it starts. If you have root privileges, you can increase this number. For example, for the LINUX Operating System you can increase the maximum number of file descriptors by modifying Oracle Web Cache users file descriptors limits in etcsecuritylimits.conf. For example to allow the user WC_USER to have 4092 connections, in the etcsecuritylimits.conf file add the following entries: WC_User soft nofile 4092 WC_User hard nofile 4092 Ensure that there are adequate file descriptors available to any process on the host by increasing the fs.file-max parameter in the etcsysctl.conf file. On Solaris Operating System you can increase the maximum number of file descriptors by setting the rlim_fd_max parameter. If webcached is not run as root, the Oracle Web Cache server logs an error message and fails to start.

10.4.2 Windows Connections

On Windows, only available kernel resources limit the number of file handles as well as socket handles - the size of paged and non-paged pools. However, the number of TCP ports the system can open restricts the number of active TCPIP connections. For more information on establishing connections, see Set Resource Limits and Network Thresholds in Oracle Fusion Middleware Administrators Guide for Oracle Web Cache.

10.5 Increasing Cache Hit Rates

A cache hit is a web browser request that can be satisfied from documents stored in the cache. A cache miss is a web browser request that cannot be satisfied from documents stored in the cache and must be forwarded to the application web server. If the ratio of cache hits to cache misses is low, consider the following ways to raise the cache hit rate: ■ Use cookies and URL parameters to increase cache hit rates. Oracle Web Cache can cache different versions of a document with the same URL, based on request cookies or headers. To use this feature, applications may need to implement simple changes, such as creating a cookie or header that differentiates the documents. Some applications contain insignificant URL parameters, which can lead to different URLs representing the same content. If the documents are cached under their full URLs, the cache hitmiss ratio becomes very low. You can configure