Niall Mullen's Weblog

Niall Mullen's Weblog
Thursday May 25, 2006

Goodbye from me

After nearly six years ill be leaving Sun, so this will be the final post on my blog.

Ive had a great time here.

Ive been fortunate enough to work with some very smart people and may well be back some
day but for now its time to take up new challenges elsewhere.

cheers,

Niall

specweb 2005 configuration : Generating SSL Certs

This blog entry forms one part of a larger guide to specweb2005 which
is indexed here.

generating SSL Certs

Specweb2005 setup will involve setting up a secure webserver, which in many cases will
involve generating ssl certs for the webserver. This is not difficult however i found
it was poorly documented.

Specweb2005 requires a server that listens both on port 80 for regular http connections
and port 443 for https connections. For the secure server on port 443 you can configure your
webserver to listen there or if using solaris you can use the kssl proxy to redirect encrypted
traffic on port 443 to port 80 unencrypted without all that trapping in and out of kernel.
If your running s10u1 or later see ksslconfig (1m).

In either case your going to have to generate ssl certs for the encrypted connections.
Although this is easy to do its suprisingly difficult to find a straight answer on how to
do it if you dont know. The explanation I found after much searching is < a href=#http://java.sun.com/developer/technicalArticles/WebServices/appserv8-1.html> here .

Here ill take the example case using Sun Java Webserver. The following is what you need to
do to generate your server certs:

cd /opt/SUNWwbsvr/alias
LD_LIBRARY_PATH=/usr/sfw/lib
PATH=$PATH:/usr/sfw/bin
export PATH LD_LIBRARY_PATH
cd /opt/SUNWwbsvr/alias
cp /etc/ssh/moduli ./seed
certutil -N -d `pwd`
certutil -R -s "CN=`uname -n`-1,O=Sun Microsystems,L=Where I am,ST=Dublin,C=IE" -p "xxx-xxx-xxxxxx" -o mycert.req -x -z ./seed -d `pwd`
certutil -S -s "CN=`uname -n`-1,o=Sun,ou=sun.com, C=IE" -n myCA -x -t "TCu,Cu,Cu" -1 -2 -5 -m
1234 -z ./seed -v 100 -d `pwd`

One by one, select options 0, 1, 5, 6 and 9, and type y when the program asks
whether this is a critical extension.
After that, you will be prompted to select from other option menus, where
you should choose 5, 6, 9 for SSL CA and S/MIME CA.

certutil -C -m 2345 -i mycert.req -o mycert.crt -c myCA -v 100 -z ./seed -d `pwd`
certutil -A -n Server-Cert -t "TCu,TCu,TCu" -i mycert.crt -d `pwd`

My source for minding most of the above comes from:

http://www.modssl.org/docs/2.8/ssl_overview.html

specweb 2005 configuration: Building the fileset

This blog entry forms one part of a larger guide to specweb2005 which
is indexed here.

Building the Fileset

Building the fileset is quite straight forward and is well documented here .

The only interesting caveat I found is the level to which one should parallellise
the building of the fileset. The building can be parallellised by generating a
series of

In the example below the script will build a fileset of 24000 for the SPECweb_Banking
workload, the only variables which need to change are dirscaling which takes the values
1000 for banking, 50 for ecommerce, and .25 for support workloads.

#!/bin/sh

i=0
dirscaling=1000

while [ $i -lt 24 ]; do

i=`expr $i + 1`

sessions=`expr $i \* 1000`

dir=`expr $sessions \* 50`
dir=`expr $dir + 1`

cat template |sed -e "s/XXX/$dir/" -e "s/YYY/$sessions/" >bank_usercheck_props.$sessions

done

for file in bank_*
do
java -server -Xms384m -Xmx384m -jar /102/wafgen/Wafgen.jar $file &
done

rm bank*

This launches 24 processes in this case to build the fileset in parallell.
I have found that one process per cpu on lower end machines and a little less at
the high end generates the best fileset build time.

Friday Feb 03, 2006

specweb 2005 configuration : Java Jsp Setup

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.

specweb 2005 configuration : PHP

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:

./configure --with-nsapi=/opt/SUNWwbsvr --enable-libgcc --enable-libxml

For isapi:

./configure --with-isapi=/opt/zeus --enable-libgcc --enable-libxml

And for fastgi / apache2

./configure --enable-libgcc --enable-libxml --enable-fastcgi --with-apxs2filter=/usr/apache2/bin/apxs

The follow this with:

make
make install

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 !

chown -R nobody:nobody /export/bench/specweb2005-102/scripts/php
cd /export/bench/specweb2005-102/scripts/php
find . |cpio -pdumv /export/fileset

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.

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

specweb 2005 configuration : Introduction


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 !
Benchmark Setup Setup of the Backend Simulator (Besim)
Webserver Configuration: PHP Compilation
Java jsp setup
Generating SSL certs
Sun Java Webserver installation & setup
Zeus Webserver installation & setup
Apache2 Webserver installation & setup
Benchmark Configuration: Specweb2005 Configuration Files & fileset

Tuesday Dec 06, 2005

sunfire t2000

Continuing the look of the new machines we have our latest offering today. The sun fire t2000 which includes our new "cool threads technology" or ultrasparc-t1 or sun4v for those not in marketing. On the surface we have reused that nice easy to open box seen in the 4200 aka galaxy machine.

As with the galaxy we have the 4 e1000g interfaces on the rear

This allows using solaris 10's Link aggregation architecture which is part of the Gld v3 driver framework in Solaris 10. This allows all four on board nics to act as a sinlge logical interface which gives some nice bandwidth.


However thats about it for similarities, the first thing you will notice is that under the hotswap location for the fans we dont have the six fans we did with the galaxy but half the amount some indication of the lower power requirments of the new cpu.


My colleague Fintan Ryan has already posted the details of exactly what you get under the hood, 32 threads of execution on 8 cores - very nice for size of this piece of kit considering its lower power requirments.
So ill leave you with about as much as can physically be seen of the new cpus. Maybe not as cool looking as you might expect for the punch packed inside, but hey its whats inside that counts !




Monday Sep 12, 2005

Introductions

So with starting this blog I thought I should make a brief intro as to who I am.

My name is Niall Mullen Ive been in Sun for a litte over five years, ever since I graduated from ucd . I originally worked for the Solaris Pre Integration Test Group, but for the last year Ive worked in the performance group based in Dublin.

We play a part in performance qa for everythng from solaris thru the Sun one apps etc.. , through a huge amount of automated benchmarking Its already been better domcumented by my more verbose collegues what exactly we do.

Some of my group who are also blogging are linked on the right, Damien Farnham my
immediate manager, Fintan Ryan and Sean Mcgrath who write a whole lot more than I do
currently so it may be worth looking them up

oooh pretty, the new galaxy


Well today we ship our new range of systems the x4100 & x4200 known internally as
"galaxy". I've been working with these systems for some time. The new box's as is
being widely reported have been designed by our returned co-founder and hardware design
guru Andy Bechtolsheim. So what are they like you ask ?


Well my photography skills dont count for much, but here they are, but its
not my photography you will see else were.

See that looks much more appealing.

The The entire casing can be taken apart and back together in its entirety
without the use of a screwdriver. Ok so thats nothing revoloutionary but
definitely nice, I've seen too many box's that the case can be taken apart
etc.. with no screws, only to discover the pci cards are screwed in and I
need to go find a screwdriver.

If you actually get hold of one of these you will discover some serious
airflow, but that tends to be needed to cool the opetron beasts within,
particularly the dual core species which packs quite a punch for a 2U machine.
One of the cool design features is the airflow, its controlled and funelled by
the shape of the case to hit exactly where its needed.

The airflow itself is driven by six fans located at the front of
the machine, neatly accessible via a small top opening panel.

All fans are of course hot swappable.

This design does solve one of my pet peeves. In that i only need to
slide the box about 6 inches out of the rack and have to disconnect
a grand total of zero cables. To achive the same with one of the
ibm box's we have here, I gotta get 80% of the box out of the
rack to make it accessible as the case has to slide off all
the way from where the fans are back. To do this of course all the cables
have to come out.

Internally we have a reasonably standard internal configuration, with a
few differences from the norm: 4 x 2.5" drives and a dvd on the front.
4 x gigabit eithernet on the back which is nice to have I spend too much
time searching for extra ethernet cards.


So I for one welcome our new silver, easy access, hotswappable overlords.


Archives
Links
Referrers