![]() |
![]() |
| |||||||||||||||||||||||
Chapter 2Managing Web Cache ServersThis chapter provides an overview of the Solaris Network Cache and Accelerator (NCA). Also, procedures for using NCA and reference material about NCA are included. Network Cache and Accelerator (Overview)The Solaris Network Cache and Accelerator (NCA) increases web server performance by maintaining an in-kernel cache of web pages that are accessed during HTTP requests. This in-kernel cache uses system memory to significantly increase performance for HTTP requests that are normally handled by web servers. Using system memory to hold web pages for HTTP requests increases web server performance by reducing the overhead between the kernel and the web server. NCA provides a sockets interface through which any web server can communicate with NCA with minimal modifications. In situations where the requested page is retrieved from the in-kernel cache (cache hit), performance improves dramatically. In situations where the requested page is not in the cache (cache miss) and must be retrieved from the web server, performance is also significantly improved. This product is intended to be run on a dedicated web server. If you run other large processes on a server that runs NCA, problems can result. NCA provides logging support in that NCA logs all cache hits. This log is stored in binary format to increase performance. The ncab2clf command can be used to convert the log from binary format to common log format (CLF). The Solaris 9 release includes the following enhancements:
New NCA FunctionalityThis release now provides support for a web server to open multiple AF-NCA sockets. With multiple sockets, you can have different web servers that run on one server. In addition, a new configuration file that is called /etc/nca/ncaport.conf is available. The file can be used to manage the IP addresses and ports that NCA uses. Your web server might not provide native support of the AF_NCA socket. If your server lacks this support, use this file and the NCA socket utility library to convert an AF_INET socket to an AF_NCA socket. Managing Web Cache Servers (Task Map)The following table describes the procedures that are needed to use NCA.
Planning for NCAThe following sections cover the issues that need to be resolved before starting the NCA service. System Requirements for NCATo support NCA, the system must meet these requirements:
This product is intended to be run on a dedicated web server. The running of other large processes on a server that runs NCA can cause problems. NCA LoggingThe NCA service can be configured to log web activity. Generally, NCA logging should be enabled if the web server logging is enabled. Interpositioning Library for Daemon Support of the Door ServerMany web servers use AF_INET sockets. By default, NCA uses AF_NCA sockets. To correct this situation, an interpositioning library is provided. The new library is loaded in front of the standard socket library, libsocket.so. The library call bind() is interposed by the new library, ncad_addr.so. Suppose that the status is enabled in /etc/nca/ncakmod.conf. The version of Apache that is included with the Solaris 9 release is already set up to call this library. If you are using IWS or Netscape servers, see How to Load the Socket Utility Library for NCA to use the new library. Multiple Instance SupportSystems that have NCA installed often need to run multiple instances of a web server. For instance, a single server might need to support a web server for outside access as well as a web administration server. To separate these servers, you would configure each server to use a separate port. Administering the Caching of Web Pages (Tasks)The following sections cover the procedures to enable or disable parts of the service.
|
# cat /etc/nca/nca.if hme0 hme1 |
Each interface must have an accompanying hostname.interface-name file and an entry in /etc/hosts file for the contents of hostname.interface-name. To start the NCA feature on all interfaces, place an asterisk, *, in the nca.if file.
Enable the ncakmod kernel module.
Change the status entry in /etc/nca/ncakmod.conf to enabled.
# cat /etc/nca/ncakmod.conf # # NCA Kernel Module Configuration File # status=enabled httpd_door_path=/var/run/nca_httpd_1.door nca_active=disabled |
(Optional) Enable NCA logging.
Change the status entry in /etc/nca/ncalogd.conf to enabled.
# cat /etc/nca/ncalogd.conf # # NCA Logging Configuration File # status=enabled logd_path_name="/var/nca/log" logd_file_size=1000000 |
You can change the location of the log file by changing the path that is indicated by the logd_path_name entry. The log file can be a raw device or a file. See the following examples for samples of NCA log file paths. See the ncalogd.conf(4) man page for more information about the configuration file.
(Optional) Define ports for multiple instance support.
Add the port numbers in the /etc/nca/ncaport.conf file. This entry causes NCA to monitor port 80 on all configured IP addresses.
# cat /etc/nca/ncaport.conf # # NCA Kernel Module Port Configuration File # . . ncaport=*/80 |
For IA only: Increase the virtual memory size.
Use the eeprom command to set the kernelbase of the system.
# eeprom kernelbase=0x90000000 # eeprom kernelbase kernelbase=0x90000000 |
The second command verifies that the parameter has been set.
Note - By setting the kernelbase, you reduce the amount of virtual memory that user processes can use to less than 3 Gbytes. This restriction means that the system is not ABI compliant. When the system boots, the console displays a message that warns you about noncompliance. Most programs do not actually need the full 3-Gbyte virtual address space. If you have a program that needs more than 3 Gbytes, you need to run the program on a system that does not have NCA enabled.
Reboot the server.
Previous Contents Index Next ![]() |