This blog entry forms one part of a larger guide to specweb2005 which
is indexed here.
Java Jsp Setup : Deploying the Warfiles
Specbweb2005 provides two different options for the server side script implementation,
PHP or Jsp. To use jsp rather than php the Specweb2005 distribution includes a number
of Java application warfiles which must be deployed on the webserver under test.
To deploy the warfiles on the Sun Java webserver is quite easy, the
following few lines of shell will do it for a webserver in the default
location of /opt/SUNWwbsvr:
Deploy the java warfiles
WDEPLOY=/opt/SUNWwbsvr/bin/https/bin/wdeploy
WEBSERVER=/opt/SUNWwbsvr/https-${SERVER}-1
cd /export/bench/specweb2005-102/scripts/jsp
for file in `ls *.war`
do
name=`echo $file |cut -f1 -d.`
$WDEPLOY deploy -u /$name -i https-${SERVER}-1 -v https-${SERVER}-1 -d $WEBSERVER/webapps/$name $DIR/$file
echo $?
done
For each of the three warfiles you should get output similar to the following:
[wdeploy] The directory /export/bench/opt/SUNWwbsvr/https-oaf-x-1/webapps/bank doesn't exist. Creating it.
[wdeploy] Trying to change the ownership of the deployed files to nobody.
[wdeploy] Deploying web application
[wdeploy] Loading new configuration
[wdeploy] Exception when reconfiguring the server failure: server not running
[wdeploy] Exception is ignored, please reconfigure manually...
[wdeploy] Web application deploy successful
Once this is done you can restart your webserver. The startup with php and java both configured should
now look something like:
Sun ONE Web Server 6.1SP5 B04/18/2005 14:49
info: php5_init reports: Initialized PHP Module (128 threads exspected)
info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun Microsystems Inc.]info: WEB0100: Loading web module in virtual server [https-oaf-x-1] at [/bank]
info: WEB0100: Loading web module in virtual server [https-oaf-x-1] at [/ecommerce]
info: WEB0100: Loading web module in virtual server [https-oaf-x-1] at [/support]
info: WEB0100: Loading web module in virtual server [https-oaf-x-1] at [/search]
info: HTTP3072: [LS ls1] http://oaf-x-1:80 ready to accept requests
startup: server started successfully
In the case of apache you will need to install the apache tomcat application server,
and deploy the warfiles on it. The good folks at apache have a better guide to this
that I could ever find which you will find here.
The zeus webserver can be configured using the app server of your choice,
tomcat is one possability. Zeus have documented all of this here.
Finally the specweb2005 configuration files will need to be modified to use jsp rather
than php as they are set to by default. This will be covered in a later section of this guide.
This blog entry forms one part of a larger guide to specweb2005 which
is indexed here.
PHP Compilation
Specbweb2005 provides two different options for the server side script implementation,
PHP or Jsp. For php to be used the php distribution must be compiled such that the
libphp is correct for your webserver, i.e. nsapi for Sun Java Webserver, isapi for Zeus
or Windows, or fastcgi for apache.
Secondly the compiled PHP module must be installed on the webserver.
First setp is to grab a copy of the php source here.
php.net contains a perfectly good guide on howto build php , the only thing which I feel needs to be added here is specifically what arguments need to be
passed to the compile to build the different module types listed above.
The php compile will require your webserver of choice to be installed already so that it can
source header files from the webserver to correctly build the libphp module, so I'll assume the
following locations:
Sun Java Webserver - /opt/SUNWwbsvr
apache2 - /usr/apache2 ( there by default with solaris10 )
Zeus /opt/zeus
Of course your only going to need one of these, which ever you prefer.
To build the nsapi module use the following command:
This will build your php distribution. The module you need to deploy in your webserver
can be found in the libs directoy and is called ( at the time of writing ) libphp5.so.
-rwxr-xr-x 1 root root 6249892 Jan 13 15:03 libphp5.so
Deployment in Webserver
This is already covered in as much detail as I could on php.net
The only thing to be aware of is that the documents are for php4, so
if your using php5 ( or 6 or 7 someday ... ) all instances of "php4"
in the config files should be changed to php5.
For Sun Java Webserver the guide is here.
For apache2.0 the guide is here.
For zeus instructions can be found on the zeus website here.
Adding the specweb dynamic php scripts
Once php is up and running a final simple step that must be taken,
is to add the spec supplied php scripts to the fileset,
which is simply a case of dumping the files across,
and of course making sure that your webserver user has permissions to access them !
The final thing to do is to make sure the specweb configuration files are setup
for php and not jsp, which Ill cover among other things in a later section of this guide.
This blog entry forms one part of a larger guide to specweb2005 which
is indexed here.
The Backend Simulator of the Specweb2005 benchmark acts in the place of a
database behind the webserver. It dynamically produces data in response to
requests from the webserver.
The implementation is in c and must be compiled as a module to be deployed
on your webserver using nsapi, isapi or fastcgi.
In this case ill be using the following different configurations on some
of my test rigs:
nsapi -> Sun Java Webserver - example used here
isapi -> Zeus Webserver
fastcgi -> apache 2.0
The besim source is located in the besim directory within the specweb2005
distribution once installed. For the nsapi case we will assume that were using
the SUNWsrpo compilers seeing thats its a compile for the sun webserver.
Building The Module
First you need to cp Makefiles/Makefile.nsapi.`uname -m` Makefiles/Makefile.nsapi
The makefiles by default point to your compilers at /opt/SUNWspro, if
they arent here you will need to change Makefiles/Makefile.nsapi
Secondly the compilation requires the nsapi.h header file. For this you will
need to have a copy of the Sun Java Webserver handy. Lets assume in this case
that its in the default location of /opt/SUNWwbsvr. You just need to point your
include path at it, i.e.:
The only other change required is to move the listen port to somthing other than 80 ,
I have used 81. This is all thats needed to setup the besim.
Testing the Simulator
The Specweb2005 distribution contains a three perl scripts to test that the
besim is functioning correctly. The perl scripts themselves however require
several modules which must be installed before use.
Once these are all installed you just need to change the #! to point to your perl
as by default it points to a non standard location.
Then your good to test the server:
The next few entries here are going to be based around the configuration
of the specweb2005 benchmark and all that is required to set it up.
Having been through this process I have found that there doesn't seem to be a whole
lot of information out there about this, at least google doesnt think so !
The write ups here initiall are going to focus on what is required to configure
the benchmark to get it running and NOT on tuning it to get the maximimum performance
out of your rig - that may come later..
Firslty for anyone who hasnt a clue what im rambling about, Specweb2005
is the latest incarnation of an industry standard webservices benchmark developed by the
Standard Performance Evaluation Corporation which
aims to benchmark the ability of a given machine running kind of load that modern
webservers experience. It is used by many hardware manufacturers, ourselves included to
show off the latest offerings by submitting benchmark scores
from the benchmark running to spec.org .
The benchmark consists of three tiers:
Backend Simulator
<->
Webserver
<->
Load Generating Client 1
....
<-> Load Generating Client n
The Webserver in the middle layer being the machine under test.
The topics the next few entries will cover are below.
As each entry is written ill update the below and link it, so if the
topic below is a link there's an entry, if not check back soon !