Installation and Performance Tuning of Microsoft Scalable Web Cache (SWC 1.1) May 1999 Introduction Scalable Web Cache (SWC) is an HTTP 1.0 caching server for web request operations with Internet Information Server (IIS) as a backing server. The design goals are based on IIS's basic data transfer algorithm with certain performance principles that take advantage of Windows NT scalability in an SMP environment. While SWC was designed for an SMP environment, it shows significant gains in a single-processor environment. In addition to partitioning, SWC caches data in a user space cache that is shared among all threads. The data cache can be "flushed" manually or on a periodic basis. SWC may be used for web sites with large amounts of static content. It is highly optimized for the HTTP GET request. Web sites that serve mostly static content can see performance gains with the use of SWC 1.1. SWC Usage General usage for SWC is described below. Please refer to the Software Configuration section below for more details. Setup * IIS must be configured to listen at port 81 (instead of 80) if SWC is installed. * Start SWC from the directory you intend to log in. * SWC 1.1 requires Windows NT 4.0 and IIS 4.0 (Service Pack 4 or higher) Command Line Options SWC is started with two command line options: * -t : specifies the interval at which the cache is flushed * -m ,,: specifies the IP address to listen on, the affinity mask for threads listening on the address, and the number of listener threads. Multiple -m options may be specified. Example: swc -t 60 -m 11.1.2.3,2,2 -m 11.2.3.4,1,2 will start two threads listening on 11.2.3.4 and running on processor zero, and two threads listening on 11.1.2.3 and running on processor one. The flush interval is set to 60 seconds. SWC Log SWC produces a list of cache misses in misslog.swc and a list of cache hits in mslogXXX.swc. The SWC logs are in a binary format. A post-processor, SWCPP.EXE is provided to convert the binary log to text format. Usage: swcpp -o -m -l -s Example: swcpp -o swclog.txt -m misslog.swc -l mslog001.swc mslog 002.swc -s 10000 Usage Limitations SWC is a high performance cache. However, it is most appropriately used keeping the following limitations in mind: * SWC 1.1 supports only HTTP 1.0. * SWC 1.1 is not a replacement for IIS. It is a caching front-end. IIS must still handle and respond to any cache misses. * Being a caching front-end, SWC 1.1 is best used in a static environment. In a highly static environment, SWC 1.1 can boost data throughput significantly. The performance advantage of SWC can be lower for sites serving non-cacheable content. Software Configuration The following notes detail how to optimally configure Windows NT 4.0 SP4, IIS 4.0, and SWC 1.1. This assumes that the user has installed Windows NT 4.0, followed by the NT Option Pack and finally, applied NT Service Pack 4. Windows NT * Enable three gigabyte addressing by adding the /3GB option in boot.ini if you intend to cache large amounts of data in SWC. Internet Information Server (IIS) Setup After IIS Service Manager has been invoked, right-click on "Default Web Site" and select "Properties". In this area, configure IIS as follows: * Web Site tab - Set IIS to listen on port 81 (default=port80) * * * * * * * * * * * * * * * SWC installation and execution Create a directory off the root of your log drive strip called "SWC". Copy the SWC binary to this directory. SWC can be started from the command line with the following flags: * -t * -m , , ,, An example: SWC -t 36000 -m 11.1.1.100,1,1 11.2.1.100,2,3 Breaking down the mappings in this example, we see that the first segment, 11.1.1.100 is assigned one thread and has a thread affinity mask binding it to processor 1. The second segment, 11.2.1.100 is assigned two threads, but is given a thread affinity mask value binding it to processors 1 and 2. Once SWC is running, a "monitor" can be called by typing "m" at the prompt. This monitor will report rate (number of operations per second) and cache information for one minute. You may re-invoke the monitor as needed. SWC Logging and Post-Processing SWC logs all transactions in a binary format. In order to view the logs generated by SWC, you must first batch process the logs using the post-processing tool SWCPP.exe that is included with the SWC 1.1 distribution. SWC generates two types of log files. First is the MISSLOG.SWC which logs all of the cache misses. The other type is the MSLOG00(X).SWC which logs all other transaction information. Command Line Options: -o specifies an output file name. -m specifies the MISSLOG.SWC file to be processed -l specifies the MSLOG.SWC file(s) to be processed -s specifies the step increment (default = 10000) Sample Usage: swcpp -o foo -m misslog.swc -l mslog001.swc mslog002.swc mslog003.swc -s 100000 SWC 1.1 Documentation 1 Microsoft Corporation