Go to main content

Enhancing System Performance Using Clock Synchronization and Web Caching in Oracle Solaris 11.3

Exit Print View

Updated: October 2017

Overview of Network Cache and Accelerator

The 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 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 Oracle Solaris release includes the following enhancements:

  • Sockets interface.

  • Support for vectored sendfile, which provides support for AF_NCA. See the sendfilev(3EXT) man page for more information.

  • New options for the ncab2clf command that support the ability to skip records before a selected date (–s) and to process a specified number of records (–n).

  • logd_path_name in ncalogd.conf can specify either a raw device, a file, or a combination of the two.

  • 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.

  • A new configuration file, /etc/nca/ncaport.conf, to manage the IP addresses and ports that NCA uses. If web server does not provide native support for the AF_NCA socket, use this file and the NCA socket utility library to convert an AF_INET socket to an AF_NCA socket.

For task information about managing and administering web cache servers, refer to Managing Web Cache Servers Task Map and Administering the Caching of Web Pages.

NCA Architecture

The NCA feature includes the following components.

  • Kernel module, ncakmod

  • Web server, httpd

The kernel module ncakmod maintains the cache of web pages in system memory. The module communicates with a web server, httpd, through a sockets interface. The family type is PF_NCA.

The kernel module also provides a logging facility that logs all HTTP cache hits. NCA logging writes HTTP data to the disk in binary format. NCA provides a conversion utility for converting binary log files to common log format (CLF).

The following figure shows the flow of data for the conventional path and the path that is used when NCA is enabled.

Figure 1  Data Flow With the NCA Service

image:This figure shows the flow of data from a client request through                             the NCA layer in the kernel.

NCA to Httpd Request Flow

The request flow between the client and the web server proceeds as follows:

  1. An HTTP request is made from the client to the web server.

  2. If the page is in cache, the in-kernel cache web page is returned.

  3. If the page is not in cache, the request goes to the web server to retrieve or update the page.

  4. Whether the page is cached depends on the HTTP protocol semantics that are used in the response, or not. If the Pragma: No-cache header is included in the HTTP request, the page is not cached.

  5. The page is returned to the client

Required Files for NCA

The following table lists the files that are necessary to support the NCA feature. Many of these files are ASCII, but some of the files are binary.

Table 2  NCA Files
File Name
Path name for the NCA device.
File that lists all physical interfaces that are configured on the server.
File that lists all host names that are associated with the server. Entries in this file must match entries in /etc/hostname.* files for NCA to function.
Script that starts the NCA server. This script is run when a server is booted.
Script that starts NCA logging. This script is run when a server is booted.
File that lists the interfaces on which NCA is run. See the nca.if(4) man page for more information.
File that lists configuration parameters for NCA. See the ncakmod.conf(4) man page for more information.
File that lists configuration parameters for NCA logging. See the ncalogd.conf(4) man page for more information.
File that lists the IP addresses and the ports for NCA. See the ncaport.conf(4) man page for more information.
Door path name.
Command that is used to convert data in the log file to the common log format. See the ncab2clf(1) man page for more information.
Command that is used to configure NCA to run on multiple interfaces during boot. See the ncaconfd(1M) man page for more information.
Library that uses AF_NCA sockets instead of AF_INET sockets. This library must be used on web servers that use AF_INET sockets. See the ncad_addr(4) man page for more information.
File that holds the log file data. The file is in binary format, so do not edit it.