SPECvirt_sc2010 User's Guide

Version 1.01


    1.0 Requirements
    2.0 Setting Up The Test Environment
       2.1  Infraserver VM Setup
            2.1.1  VM Creation
            2.1.2  Workload Setup
       2.2  Webserver VM Setup
            2.2.1  VM Creation
            2.2.2  Workload Setup
       2.3  Mailserver VM Setup
            2.3.1  VM Creation
            2.3.2  Workload Setup
       2.4  Dbserver VM Setup
            2.4.1  VM Creation
            2.4.2  Workload Setup
       2.5 Appserver VM Setup
            2.5.1  VM Creation
            2.5.2  Workload Setup
       2.6 Idleserver VM Setup
            2.6.1  VM Creation
            2.6.2  Workload Setup
    3.0 Setting up the Clients
        3.1  Install Java JDK
        3.2  Setup Client Hostnames
        3.3  Operating System Tuning
        3.4  Setup SPECvirt Harness
    Appendix A
    Appendix B


1.0 Requirements

These instructions assume that you are familiar with the following:

Running shell scripts
Editing files with a text editor like vi
Installing and configuring operating systems and applications
Installing and configuring a virtualized environment

This guide assumes the following SPECvirt kit versions:

SUT Resource Requirements

The SPECvirt Users Guide can be used to set up multiple tiles with each tile consisting of 6 different virtual machines.

Client Requirements

A client machine should be able to drive a complete tile's workload if it has the following minimum characteristics.

Given sufficient resources, multiple tiles can be driven from a single client. 

Software Requirements

All software used must be currently supported per the SPECvirt_sc2010 Run and Reporting Rules.

 


2.0 Setting Up The Test Environment


The SPECvirt benchmark consists of 4 workloads
  1. A Web workload based on SPECweb2005 Support
  2. An IMAP workload based on SPECmail2009
  3. A Java application server workload based on SPECjAppServer2004
  4. A polling workload called SPECpoll
While some of these 4 workloads are based on standalone SPEC benchmarks, the actual workloads used in SPECvirt have been highly modified.  Therefore, the setup of these workloads in the SPECvirt test environment will differ somewhat from setting up the workloads in their standalone form.  

TIP: If you have a mix of  Windows and Linux/Unix operating systems in your SPECvirt configuration, it is recommended that you run a program like dos2unix on all files modified under Windows and then copied to Linux/Unix.  This will prevent benchmark errors that are caused by file formatting which are very hard to track down.


2.1   Infraserver VM Setup

2.1.1   VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics
    Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine. Configure a network interface to be connected to an external network that the clients and VMs will communicate over. You may also want to configure another virtual network interface to be connected to an internal network that the VM can use to communicate with the webserver VM.  This internal network does not have to be associated with a physical network port.

2.1.2   Workload setup

    The infraserver VM contains files that need to be accessed by the webserver VM.  The infraserver VM also acts as the back end simulator (BeSim) for the SPECweb2005 workload.

Here are the steps for setting up the infraserver VM

  1. Copy the SPECweb2005 and SPECpoll directories from the harness kit onto a directory on the infraserver virtual machine.  (/opt for example)
  2. Install your preferred Java Compatible JRE software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.   (A JRE is needed by the SPECpoll code that will run on the VM)
  3. Setup a remote filesystem
  4. Create a filesystem with 35GB of space.
  5. Configure the filesystem to be accessible by the webserver VM.  (For example, exporting the filesystem using NFS)
  6. Setup the BeSim functionality
     
    • Configure the system with Web server software installed on port 81 or another port (avoid port 80 to avoid confusion with the primary Web server).
    • Build your BeSim code, see Appendix A

      NOTE: For Windows/IIS, a precompiled ISAPI is provided (BeSim.dll); copy this to a directory with ISAPI execute permissions, and skip to the "Start your BeSim Web server" step.

      You may choose from FastCGI* for Zeus or Apache or ISAPI for Zeus or IIS or NSAPI for SUN One and edit the appropriate MakeIncl.<type>.<OS> file to reflect your compile and linker options and select one or more Defines.  Then you can build the BeSim code for your selected API.  (If using FastCGI , please copy the FastCGI executable from the Redistributed Open Source code directory into the BeSim directory.)

    • Install this code to your BeSim Web server.
    • Start your BeSim Web server.
    • Use the  test_besim_support scripts (included in the "besim" subdirectory of the installation) to test whether you're getting valid BeSim responses.  Both Perl scripts and Linux bash scripts are provided.  The Perl scripts require a Perl interpreter as well as the following Perl modules: URI, HTML-Tagset, HTML-Parser, and libwww-perl.  The bash scripts require cURL to be in the path.

      *Note: For more FastCGI instructions (particularly for the Apache HTTP Server), see Appendix B.
  7. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

If you have additional questions about setting up your besim server you may want to refer to the SPECweb2005 User's Guide (http://www.spec.org/web2005/docs/1.20/users_guide.html).  It should be noted that the SPECvirt harness only uses a modified version of the Support workload from SPECweb2005, so the Ecommerce and Banking workloads do not need to be setup.

 

2.2   Webserver VM Setup

2.2.1    VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics     Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine. Configure a network interface to be connected to an external network that the clients and VMs will communicate over. You may also want to configure another virtual network interface to be connected to an internal network that the VM can use to communicate with the infraserver VM.  This internal network does not have to be associated with a physical network port.

2.2.2    Workload setup

    The webserver VM runs HTTP web server software that hosts a SPECweb2005 based Support workload.

    Make sure you have done the steps for Infraserver and the infraserver VM for your tile is powered on before setting up webserver.  The webserver VM must have the support/downloads directory remotely accessible from the infraserver VM. This remote access point also needs to be present during web workload file generation.
 

  1. Copy the SPECweb2005 and SPECpoll directories from the harness kit onto a directory on the web server virtual machine.  (/opt assumed for the purposes of  the examples)
  2. Set localization on the system to US.
  3. Install your preferred Java Compatible JRE software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.   (A JRE is needed by the SPECpoll code that will run on the VM)
  4. Install and configure your favorite web server software with  PHP support.
  5. Set your current working directory to the wafgen directory.
    # cd /opt/SPECweb2005/wafgen
  6. Setup PHP:
    • Check to see that you have a version of PHP (such as PHP 5.x from http://www.php.net) and that your Web server is configured to support PHP dynamic scripts.
    • Copy the contents of the /opt/SPECweb2005/Scripts/PHP/* directory to your document root (i.e. cp -ar /opt/SPECweb2005/Scripts/PHP/* /var/www/html/ )
    • Copy the Smarty-2.6.26 directory from the folder with "redistribution" folder into a folder under document root.  Verify the  "support", and "Smarty-2.6.26" subdirectories are now under the document root.
    • Ensure the web server has read and write access to these directories and subdirectories (i.e. chmod -R a+rw support/ Smarty-2.6.26/ from the document root).  An alternative is to use chown to assign ownership to the Web server user/group.
    • The stock PHP distribution ships with two ini files, php.ini-dist and php.ini-recommended. While php.ini-recommended is optimized for performance and security, for initial troubleshooting, php.ini-dist may be a better choice. This will configure PHP to display errors in the browser. If PHP comes with your OS distribution, you may only have one php.ini, in which case you should consider changing "display_errors" and "display_startup_errors" to "On".  You may also want to set " error_reporting = E_ALL", which will display all errors and warnings.
  7. Make the document root support/downloads directory a fileserver mount from the infraserver VM (You may want to use a VM internal network for this mount if available)
  8. Go to the SPECweb2005/wafgen directory and edit the support wafgen files to set the TILEINDEX value for the tile you are creating.
    • Edit the /opt/SPECweb2005/wafgen/unix/support_downloads_props.rc and set the parameter TILEINDEX equal to the tile number minus 1.  (ie, set TILEINDEX=1 for tile #2)
    • Edit the /opt/SPECweb2005/wafgen/unix/support_image_props.rc and set the parameter TILEINDEX equal to the tile number minus 1.  (ie, set TILEINDEX=1 for tile #2)
  9. Build the image files (Wafgen unix/support_image_props.rc)
  10. Build the support files (Wafgen unix/support_downloads_props.rc)  (Note: This command could take over an hour to run.)
  11. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -web -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

Since the data created for the webserver VM workload is specific to a particular tile, the data files cannot be copied and used on the webserver VMs of different tiles.

If you have additional questions about setting up your web server you may want to refer to the SPECweb2005 User's Guide (http://www.spec.org/web2005/docs/1.20/users_guide.html).  It should be noted that the SPECvirt harness only uses a modified version of the Support workload from SPECweb2005, so the Ecommerce and Banking workloads do not need to be setup.


2.3   Mailserver VM Setup

2.3.1    VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics     Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine. Configure the network interface to be connected to an external network that the clients and VMs communicate over.

2.3.2    Workload setup

  1. Copy the SPECpoll directory from the harness kit onto a directory on the mailserver virtual machine.  (/opt assumed for the purposes of  the examples)
  2. Install your preferred Java Compatible JRE software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.   (A JRE is needed by the SPECpoll code that will run on the VM)
  3. Install your preferred IMAP server software.
  4. Configure a storage location in your IMAP server that can hold 15GB of data.
  5. Set up 500 users in your IMAP server software for the benchmark.  (See section 2.3.2.1)
  6. Load the user accounts with data using the SPECvirt_sc2010 IMAP loader before you run the benchmark.  The load may be initiated from either a client machine or from the mailserver VM itself.
    • Modify the IMAP config file (/opt/SPECimap/IMAP_config.rc)  for the load
      1. Replace the CLIENTS variable with the hostname of the machine that will be running the load commands.
      2. A high thread count (such as 100) is recommended to expedite the loading process in the next step. This can be set by changing the THREADS_PER_CLIENT line from 1 to a higher value; 100 has worked for some, but 20 may be a safer value).
    • Use the run_load_gen and run_init .sh or .bat files to load the mailstore
      1. cd /opt/SPECimap
      2. run_load_gen.sh (in one virtual terminal or command shell)
      3. run_init.sh (in a second virtual terminal or command shell)
        NOTE: This step populates the imap server with messages and may take more than 20 minutes to complete. 
      4. Once the load is done, you will need to kill the specimapclient Java process that is left running.
  7. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

Once a mailstore is created and loaded, it can be copied and used as the mailstore on other tiles.  We recommend backing up the mailstore once it has had the workload run against it and use this "warmed up" version of the mailstore for the restores.  This "warm up" period may need to be a few hours depending on your IMAP server.

For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

If you have additional questions about setting up your IMAP server you may want to refer to the SPECmail User's Guide (http://www.spec.org/mail2008/docs/userguide.html).  It should be noted that the SPECvirt_sc2010 IMAP workload issues no SMTP or POP3 commands, so these functionalities do not need to be setup.

2.3.2.1 Creating User Accounts on the Server

You will need to create 500 user accounts on your mail server for the benchmark and they must be of the form <USERNAME_PREFIX><USER_ID>, for example test1 and test500. The USERNAME_PREFIX is defined in the configuration file SPECimap/IMAP_config.rc and defaults to test . This parameter can be changed if needed to successfully create users in your IMAP server.  Each user has a unique user ID, which is a number whose lower and upper bounds are defined in the SPECimap/IMAP_config.rc configuration file.

Note:  Some IMAP server software may also require you to create corresponding operating system or domain user accounts.

 

2.4   Dbserver VM Setup

2.4.1    VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics     Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine. Configure a network interface to be connected to an external network that the clients and VMs will communicate over. You may also want to configure another virtual network interface to be connected to an internal network that the VM can use to communicate with the appserver VM.  This internal network does not have to be associated with a physical network port.

2.4.2    Workload setup

The dbserver VM acts as the database backend for the SPECjAppServer2004 workload.  SPECvirt_sc2010 has modified the workload to access across 25 times more database data than the usual SPECjAppServer2004 workload at a given injection rate.  This means that the average SPECvirt_sc2010 driver injection rate of 20 will be accessing a database sized for an injection rate of 500.

  1. Copy the SPECjAppServer2004 and SPECpoll directories from the harness kit onto a directory on the database server virtual machine.  (/opt assumed for the purposes of  the examples)
  2. Install your preferred Java Compatible JRE software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.   (A JRE is needed by the SPECpoll code that will run on the VM)
  3. Install your preferred database software and configure.  The configuration for your database server software needs to be tuned to handle the peak injection rate (IR) of 45.
  4. Configure a storage location in your database software that can hold 10GB of data.
  5. Load your database for a SPECjAppServer2004 injection rate (IR) of 500.  If desired, you can also run these steps to load the database from the client rather than from the dbserver VM.
    • Modify the /opt/SPECjAppServer2004/config/run.properties file on the client so the variable txRate=500.
    • Load the database using scripts specific to your database.  You can find some example schemas and database population scripts in the SPECjAppServer2004/schema directory.
    • After the load finishes, change the value of txRate in  /opt/SPECjAppServer2004/config/run.properties back to the runtime injection rate of txRate=20.
    • Backup the database once it has been built.
  6. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

The database backup can be copied and used on other tiles. A backup of the database is required because a database restore needs to be done before each benchmark run.

2.5   Appserver VM Setup

2.5.1    VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics     Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine. Configure a network interface to be connected to an external network that the clients and VMs will communicate over. You may also want to configure another virtual network interface to be connected to an internal network that the VM can use to communicate with the dbserver VM.  This internal network does not have to be associated with a physical network port.

2.5.2    Workload setup

Make sure you have done the setup steps for dbserver and the dbserver VM for your tile is powered on before setting up the appserver VM.  The appserver VM accesses the database contained on the dbserver VM.

  1. Copy the SPECjAppServer2004 and SPECpoll directories from the harness kit onto a directory on the appserver server virtual machine.  (/opt assumed for the purposes of  the examples)
  2. Install your preferred Java Compatible JDK software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.
  3. Install your preferred J2EE application server software.  Note: For SPECvirt_sc2010, the Supplier Emulator (emulator.ear) MUST reside on the appserver VM
  4. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -app -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.
     

Setting up a SPECjAppServer2004 environment is challenging.  We strongly recommend using an application stack from a previously published SPECjAppServer2004 result.  The SPECjAppServer2004 Full Disclosure Archive associated with a result contains useful files and information that would help set up application and database server software.

Refer to the SPECjAppServer2004 User Guide (http://www.spec.org/jAppServer2004/docs/UserGuide.html) to setup your J2EE application server for the SPECjAppServer2004 workload.  The database portion of the SPECjAppServer test will be setup on the dbserver VM. 

The configuration for your J2EE application server needs to be tuned to handle at least a SPECjAppServer2004 injection rate (IR) of 45 (585 active connections).

2.6   Idleserver VM Setup

2.6.1    VM  creation


    Use your preferred virtualization software to create a virtual machine that has the following characteristics     Once your virtual machine is created, then install your preferred operating system in the newly created virtual machine.  The operating system of the idleserver VM must be of the same type and version as at least one other VM in the tile. Configure a network interface to be connected to an external network that the clients and VMs will communicate over.

2.6.2    Workload setup

  1. Copy the SPECpoll directory from the harness kit onto a directory on the idleserver virtual machine.  (/opt assumed for the purposes of  the examples)
  2. Install your preferred Java Compatible JRE software (version 6 strongly recommended).  The Java runtime environment that comes with many Linux distributions may not be sufficient.   (A JRE is needed by the SPECpoll code that will run on the VM)
  3. The pollme.jar listener code of SPECpoll will need to be running on this VM during the test.  You can either configure the operating system running on this VM to start the listener automatically on boot, or you can have the client start the listener as a part of the test run.  The command to start on this VM should look something like this:
        java -jar /opt/SPECpoll/pollme.jar -p 8001
    For more information on SPECpoll and pollme.jar see section 2.3 of the SPECvirt Harness User's Guide.

There is no further workload setup needed for the idleserver VM.

3.0 Setting up the Client

3.1 Install Java JDK

Install a Java 1.6 or greater JDK (a JDK is needed on the client running the appserver workload) on the client if there isn't one already.

NOTE: The Java runtime environment that comes with many Linux distributions may not work with the SPECvirt harness.   It is recommended that you install another version of Java that meets the 1.6 version minimum, and ensure you are using the correct version by issuing java -version.

3.2 Setup Client Hostnames

Entries will need to be setup in the client's hosts file (or equivalent) to associate the hostnames the SPECvirt Harness uses to the appropriate IP addresses.

  1. Web workload

    Harness hostname defaults used:
    infraserver - the server that acts as the Backend Simulator (BeSim) for the web workload.
    webserver - the server where the HTTP application is running

    If you need to use different hostnames than these defaults then modify the BESIM_SERVER or WEB_SERVER parameters in the SPECweb2005/Test.config file accordingly once you have installed the SPECvirt harness.

     

  2. IMAP workload

    Harness hostname default used:
    mailserver - the server where the imap application is running

    If you need to use a different hostname than the default then modify the IMAP_SERVER parameter in the SPECimap/IMAP_config.rc file accordingly once you have installed the SPECvirt harness.

     

  3. AppServer workload

    Harness hostname defaults used:
    specdelivery - the server where the application server is running
    specemulator - the server where the emulator app is running (for SPECvirt this IP is the same as specdelivery)
    specdb - the server where the database is running

    If you need to use different hostnames than the defaults then refer to the SPECjAppServer2004 User's Guide document.
     

  4. SPECpoll workload

    Harness hostname default used:
    idleserver - the server where the SPECpoll listener process is running

    If you need to use a different hostname than the default then modify the IDLE_SERVER parameter in the SPECpoll/Test.config file accordingly once you have installed the SPECvirt harness.


    As an example,  your hosts file entries should look something like this:

192.168.1.11    infraserver
192.168.1.12    webserver
192.168.1.13    mailserver
192.168.1.14    dbserver specdelivery specemulator
192.168.1.15    appserver specdb
192.168.1.16    idleserver
 

3.3 Operating System Tuning

Running a SPECvirt tile from a client will probably require that certain operating system tuning be done in the following areas:

  1. User Limits

    If the operating system has any limits placed on the login session being used to run the SPECvirt loads then those limits may need to be increased to successfully complete a full SPECvirt benchmark run. 

    Examples:

    • Open files - The number of open files allowed by the user (ex. ulimit -n) may need to be increased.

     

  2. Networking

    Operating system default network tunings may need to be increased to facilitate the web workload.

    Examples:

    • Transmit buffers
    • Receive buffers

 

3.4 Setup SPECvirt Harness

Refer to the SPECvirt Harness User's Guide for instructions on installing, configuring, and running the SPECvirt Harness.


Appendix A - BeSim Make_Readme file

How to Build BESIM:

UNIX/LINUX:

Type: uname -s to get name of the operating system (i.e. HP-UX)
In the Makefiles directory use one of the MakeIncl.<type>.<OS>
files as a template for your  MakeIncl.<type>.<your_OS> and
update to match you environment.

To Build Fast-cgi version of BESIM:  make fcgi

To Build NSAPI version of BESIM:      make nsapi

To Build Zeus ISAPI version of BESIM: make zisapi

Optionally you can specify other make targets by adding TARGET='list of targets'
For example:

        make zisapi TARGET='clean'
        make nsapi TARGET='clean all install'

The install target will use the path specified by DEST to install the besim
exeutatble or library, so it should be set to the appropriate place on your
Besim webserver directory tree (i.e. /www/fast-cgi).

If you plan to use Fast-cgi you must build and install the Fast-CGI development
kit which provides the fast-cgi library and include files before build BESIM.
If using Apache for the BESIM webserver, that will need to include mod_fastcgi.
See: http://www.fastcgi.com/

Note: Please send any new or updated  MakeIncl.* files you want included in
a future release to web2005(at)spec.org.


Windows:

Project files are included as an example: BeSim.def, BeSim.dsp, BeSim.dsw

Appendix B - Installing BeSim as a FastCGI for the Apache HTTP Server

There are two pieces necessary to get BeSim for FastCGI working properly under Apache:

  1. Compiling the FastCGI source code and BeSim
  2. Compiling/configuring mod_fastcgi, an Apache module to invoke FastCGI for specific directories

B.1 FastCGI source compilation

  1. Compile the FastCGI source code.  The source tree is used on a BeSim (or full) installation of SPECweb2005. Here are steps to compile it:
cd <path_to_SPECweb2005>/Besim/fcgi-2.4.0/
./configure --libdir=/lib
make
make install

NOTE: --libdir=/lib was added above due to the default FastCGI Makefile installing libraries to /usr/local/lib, which is not a default library path on Linux and could cause this error upon execution of the FastCGI:

besim_fcgi.fcgi: error while loading shared libraries: libfcgi.so.0: cannot open shared object file: No such file or directory

NOTE #2: For x86_64 versions of Fedora Core 3 and 4, it was observed that --libdir=/lib64 should be specified instead of /lib.
 

  1. Create a directory for the BeSim FastCGI within your web server directory hierarchy (but preferably outside the document root).  Here are some recommended locations for different setups:

SuSE: /srv/www/fcgi-bin
Red Hat: /var/www/fcgi-bin
Apache 2.x compiled from source: /usr/local/apache2/fcgi-bin
 

  1. Compile BeSim as a FastCGI (replace /var/www/fcgi-bin/ with the directory created in the previous step):
cd <SPECweb2005>/Besim/



make fcgi TARGET='clean all install' DEST=/var/www/fcgi-bin/

This should create besim_fcgi.fcgi and install it into DEST.  If not, check the make output for errors.

B.2 Apache FastCGI Web server module: mod_fastcgi

These instructions show how to compile the FastCGI web server module for Apache (mod_fastcgi). For other web servers, please refer to their documentation to see whether FastCGI support is available.

NOTE for SuSE: SUSE Linux (8.1 and above) ships with a precompiled mod_fastcgi for Apache 2.x.  To check if it is installed, do a rpm -q apache2-mod_fastcgi; if it's not, install this package from the CDs (see your OS documentation for more instructions).  If this package is installed, you can skip the rest of this section.

NOTE for Red Hat: If using the httpd package that ships with the distribution, the httpd-devel RPM must also be installed, as it contains the necessary utilities and headers to compile Apache modules.  To check, do a rpm -q httpd-devel.

  1. Download the latest mod_fastcgi tarball from http://www.fastcgi.com/dist/ and follow the directions in the INSTALL document (INSTALL.AP2 for Apache 2.x).

    NOTE: As INSTALL.AP2 states, unless you are compiling from source,  you will need to modify top_dir in your make command.  For example, Red Hat users should use the following 'make install' command:

    make top_dir=/usr/lib/httpd install

    You should now have a mod_fastcgi.so in your Apache modules directory:
2.           Red Hat:
# ls -l /usr/lib/httpd/mod_fastcgi.so



-rwxr-xr-x 1 root root 161408 Sep 16 13:47 /usr/lib/httpd/modules/mod_fastcgi.so
Compiled from source:
# ls -l /usr/local/apache2/modules/mod_fastcgi.so
-rwxr-xr-x  1 root root 156434 Sep 21 10:03 /usr/local/apache2/modules/mod_fastcgi.so
  1. Create a directory for FastCGI to store Unix socket files, and change the permissions so the Web server can have full access to it:
    Red Hat:
    # mkdir -p /etc/httpd/fastcgi
    # chmod 777 /etc/httpd/fastcgi

    Apache 2.x from source:
    # mkdir -p /usr/local/apache2/fastcgi
    # chmod 777 /usr/local/apache2/fastcgi
     
  2. Add support for handling FastCGIs by making the following changes to httpd.conf (for Red Hat, this is in /etc/httpd/conf/):
     
    1. Add this line in the "Dynamic Shared Object (DSO) Support " section:
      LoadModule fastcgi_module modules/mod_fastcgi.so
       
    2. Add the following lines just after the ScriptAlias /cgi-bin/ line:
      ScriptAlias /fcgi-bin/ "/var/www/fcgi-bin/" # <fcgi-bin directory from Section 1, Step 2>
      FastCgiIpcDir /etc/httpd/fastcgi # <FastCGI directory from previous step>

      NOTE: Replace /var/www and /etc/httpd with /usr/local/apache2 if compiling from source.
       
    3. Add the following section, preferably after the <Directory "<CGIDIR>/cgi-bin"> section:

      <Directory "<CGIDIR>/fcgi-bin"> # <fcgi-bin directory from Section 1, Step 2>
          AllowOverride None
          Options +ExecCGI -Includes
          SetHandler fastcgi-script
          Order allow,deny
          Allow from all
      </Directory>
      AddHandler fastcgi-script fcgi

B.3 Testing the BeSim FastCGI

  1. Start (or restart) your web server.
  2. At the console, monitor your Apache error log to view any errors or warnings during FCGI execution, i.e.
# tail -f <APACHE_ROOT>/logs/error_log
You should initially see some FastCGI initialization messages such as
[Wed Sep 21 10:36:39 2005] [notice] FastCGI: process manager initialized (pid 25700)
  1. Test the BeSim FastCGI, using the scripts in the subdirectory of the SPECweb2005 installation.  See BeSim Setup for examples.

See BeSim sections above for additional information.



Copyright © 2010 Standard Performance Evaluation Corporation.  All rights reserved.