Niall Mullen's Weblog

Niall Mullen's Weblog
Friday Feb 03, 2006

specweb 2005 configuration : besim

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

LD_LIBRARY_PATH=/opt/SUNWwbsvr/plugins/include; export LD_LIBRARY_PATH

Then your good to build, simply make nsapi:

# make nsapi
nsapi
/opt/SUNWspro/bin/cc -DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DUSE_32BIT_UINT4 -I./md5 -I. -I/opt/SUNWwbsvr/plugins/include -I/opt/SUNWwbsvr/plugins/include/base -I/opt/SUNWwbsvr/plugins/include/frame -I/opt/SUNWwbsvr/plugins/include/nspr -c -xO4 -xbuiltin -DNET_SSL -DSOLARIS -D_REENTRANT -c besim_banking.c
/opt/SUNWspro/bin/cc -DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DUSE_32BIT_UINT4 -I./md5 -I. -I/opt/SUNWwbsvr/plugins/include -I/opt/SUNWwbsvr/plugins/include/base -I/opt/SUNWwbsvr/plugins/include/frame -I/opt/SUNWwbsvr/plugins/include/nspr -c -xO4 -xbuiltin -DNET_SSL -DSOLARIS -D_REENTRANT -c besim_ecommerce.c
/opt/SUNWspro/bin/cc -DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DUSE_32BIT_UINT4 -I./md5 -I. -I/opt/SUNWwbsvr/plugins/include -I/opt/SUNWwbsvr/plugins/include/base -I/opt/SUNWwbsvr/plugins/include/frame -I/opt/SUNWwbsvr/plugins/include/nspr -c -xO4 -xbuiltin -DNET_SSL -DSOLARIS -D_REENTRANT -c besim_nsapi.c
-DXP_UNIX -DSPAPI20 -DUSE_32BIT_UINT4 -I./md5 -I. -I/opt/SUNWwbsvr/plugins/include -I/opt/SUNWwbsvr/plugins/include/base -I/opt/SUNWwbsvr/plugins/include/frame -I/opt/SUNWwbsvr/plugins/include/nspr -c -xO4 -xbuiltin -DNET_SSL -DSOLARIS -D_REENTRANT -c besim_supportsite.c
/opt/SUNWspro/bin/cc -DMCC_HTTPD -DXP_UNIX -DSPAPI20 -DUSE_32BIT_UINT4 -I./md5 -I. -I/opt/SUNWwbsvr/plugins/include -I/opt/SUNWwbsvr/plugins/include/base -I/opt/SUNWwbsvr/plugins/include/frame -I/opt/SUNWwbsvr/plugins/include/nspr -c -xO4 -xbuiltin -DNET_SSL -DSOLARIS -D_REENTRANT -c randomtext.c
md5/md5c.o
cd md5; make md5c.o CFLAGS=""
cc -c md5c.c
Linking besim_nsapi.so ...
@ld -G -o besim_nsapi.so besim_banking.o besim_ecommerce.o besim_nsapi.o besim_supportsite.o randomtext.o md5/md5c.o -lpthread -lthread
done
done

Installing the Module

You now should have the compiled besim_nsapi module present in the working directory:
-rwxr-xr-x 1 root root 76556 Jan 20 15:42 besim_nsapi.so

The next step is to setup this module in your webserver.
Firstly put the module in place:
cp besim_nsapi.so /opt/SUNWwbsvr/plugins/nsapi

Then make the following changes in your webserver config directory:

obj.conf:

( at the top before the PathCheck entries)

NameTrans fn="assign-name" from="/wbesim*" name="besim" nostat="/wbesim"

( At the end of the file)


ObjectType fn="force-type" type="magnus-internal/besim"
Service fn="service_besim" method="(GET|POST)" type="magnus-internal/besim"

magnus.conf

Init fn="load-modules" shlib="/opt/SUNWwbsvr/plugins/nsapi/besim_nsapi.so" funcs
="init_besim,service_besim" NativeThread="no"
Init fn="init_besim" LateInit="yes" topdir="/export/www"

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.

Firstly if you dont have it you must add the libiconv package which can be found on Sunfreeware
Then the following four perl modules found on cpan must be added to your perl distribution:
URI
HTML-Tagset
HTML-Parser
libwww-perl

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:

# ./test_besim_bank.pl http://10.1.1.10:81/wbesim

Testing BESIM Requests for Banking Workload

http://10.1.1.10:81/wbesim?1&0&1097157010&1&2000&200&/www/bank/images&0


SPECweb2005 BESIM

SERVER_SOFTWARE = Sun ONE Web Server/6.1

REMOTE_ADDR = 10.1.1.207

SCRIPT_NAME = /wbesim

QUERY_STRING = 1&0&1097157010&1&2000&200&/www/bank/images&0


0
DONE ResetDate = 20060120, Time=1097157010,Min_UID=1,Max_UID=2000,Load=200,ChkBase=/www/bank/images,Subdirs=0

.... output continues ....

# ./test_besim_ecom.pl http://10.1.1.10:81/wbesim |more

Testing BESIM Requests for Ecommerce Workload

http://10.1.1.10:81/wbesim?2&0&1079975569&1&80&100


SPECweb2005 BESIM

SERVER_SOFTWARE = Sun ONE Web Server/6.1

REMOTE_ADDR = 10.1.1.207

SCRIPT_NAME = /wbesim

QUERY_STRING = 2&0&1079975569&1&80&100


0
DONE ResetDate = 20060120, Time=1079975569,Min_UID=1,Max_UID=80,Load=100,SL=5

# ./test_besim_support.pl http://10.1.1.10:81/wbesim |more

Testing BESIM Requests for Ecommerce Workload

http://10.1.1.10:81/wbesim?3&0&1079975569&500


SPECweb2005 BESIM

SERVER_SOFTWARE = Sun ONE Web Server/6.1

REMOTE_ADDR = 10.1.1.207

SCRIPT_NAME = /wbesim

QUERY_STRING = 3&0&1079975569&500


0
DONE ResetDate = 20060120, Time=1079975569,Load=500,SL=11

http://10.1.1.10:81/wbesim?3&1


SPECweb2005 BESIM

SERVER_SOFTWARE = Sun ONE Web Server/6.1

REMOTE_ADDR = 10.1.1.207

SCRIPT_NAME = /wbesim

QUERY_STRING = 3&1


0
5569&Open-box Computers
5570&Open-box Servers
5571&Red CD-ROMs
5572&8x Laptops
5573&36GB Projectors
5574&36GB Monitors
5575&Red Boxes

The above is just the top of the output from each script and indicatest correct
connections being made to the besim, so all is well :)

Comments:

Post a Comment:
Comments are closed for this entry.

Archives
Links
Referrers