Friday, August 03, 2007

Improve OpenSolaris Performance

So, you downloaded the latest version of OpenSolaris and it is installed and running. Well there are a few (I will add more as they become aware to me) things you can remove to improve performance and slightly clean up your system.

Following can improve performace:
Remove the Update Manager GUI, since at this time it does nothing in OpenSolaris (removes the update manager process).
# pkgrm SUNWupdatemgrr SUNWupdatemgru
Remove the Basic Registration Application (improve the startup of JDS/GNOME).
# svcadm disable svc:/system/basicreg:default
# pkgrm SUNWbrgr SUNWbrg
Following cleans the system up:
Remove PPP.
# pkgrm SUNWpppdt SUNWpppdu SUNWpppd SUNWpppdr SUNWpppg
Remove the UUCP Utilities.
# svcadm disable svc:/network/uucp:default
# pkgrm SUNWbnur SUNWbnuu

Sunday, June 24, 2007

A complete Webserver in one download

So, you have your new machine and you need to get the Website up and running today, so what do you do:
  1. Solaris comes with the Apache server, but if you want php, then you have to download it.
  2. You obtain the software source from all the sites and start compiling..Get a life.
  3. You down load the packages from http://www.sunfreeware.com, but which ones and have you got all those extra Perl modules.
  4. Why can't I download one package and GO!
Well you can there is a great site called Cool Stack off the http://www.opensparc.net which have a few software packages which have been compiled and optimised for the Sun Hardware (SPARC /T1 or AMD).
  • CSKamp. This package includes Apache2, MySQL5 and PHP5 built to work together.
  • CSKmysql. This package includes a 64bit version of MySQL5 and is built with innodb.
  • CSKperl. This package includes Perl 5. Note that Solaris 10 ships with the same version of Perl. However, in addition to being better optimized, CSKperl includes several perl extensions.
  • CSKtds, CSKncurses, CSKphplibs. These packages are optional libraries required if you plan to use the corresponding PHP extensions.
  • CSKmemcached. This package includes memcached, a distributed object cache system.
  • CSKruby. This package includes ruby, rubygems and rails.
  • CSKsquid. This package includes Squid Web Proxy Cache.

So, all you need is download CSKamp (OK! I lied 3 downloads in my case) CSKperl and "CSKtds, CSKncurses,CSKphplibs (combined as one download)"

And, yes you install the packages and you are ready to go and to prove it I obtained MediaWiki and it installed and ran with out any other modules, not bad and saved me a lifetime.


NOTEs:
- check out the FAQ since it shows you had to start packages up as services
- disable APC or upgrade to later version. (again see FAQ)
- the coolstack has now got an OpenSolaris Project

Tuesday, May 29, 2007

Benchmarking Sun X4100 using SiSoftware Sandra

Just had delivery of a new Sun Fire X4100 M2 with (2x AMD Opteron Model 2216, 4x1GB PC2-5300 DDR2-667 memory) and I thought I would test its performance compared to other machines. I decided that the best way is to install windows 2003 x86 on it and then use SiSoftware Sandra Lite XI SP2 (version 1135). The following diagrams are the results when Sandra was run from a remote PC session and windows fully patched (red show winner)

(a) Sun Fire X4100 M2
2x AMD Opteron Model 2216 @2.4Ghz,
4x1GB PC2-5300 DDR2-667 RAM

(b) Viglen
Intel Core 2 CPU 6600 @ 2.4GHz
2GB of RAM

(c) Xen/OpenSolaris
Using the Viglen above I installed OpenSolaris B78 with windows installed via Sun Xvm/Xen.

Processor ArithmetricDhrystone ALU (higher is better)Whetstone iSSE3 (higher is better
x410035291 MIPS26161 MFLOPS
Viglen21734 MIPS15158 MFLOPS
Xen10377 MIPS7260 MFLOPS


Multi-Core EfficiencyInter-Core Bandwidth (higher is better)Inter-Core Latency (lower is better)
X41003890 MB/s116 ns
Viglen7060 MB/s 74 ns
XenN/AN/A


Physical DisksDrive Index (higher is better)Random Access Time (lower is better)
X410058 MB/s 7 ms
Viglen67 MB/s14 ms
Xen117 MB/s1 ms


Memory BandwidthRAM Bandwidth Int Buffered iSSE2 (higher is better)RAM Bandwidth Float Buffered iSSE2 (higher is better)
X410010982 MB/s10953 MB/s
Viglen 5011 MB/s 5041 MB/s
Xen4762 MB/s4784 MB/s


Memory LatencyRandom Memory Latency (lower is better)Speed Factor (lower is better)
X410091 ns72.2
Viglen99 ns74.2
Xen116 ns80


Cache and MemoryCombined Index (higher is better)Speed factor (lower is better)
X4100
25235 MB/s15.7
Viglen20174 MB/s33.3
Xen12570 MB/s17.1

Sunday, March 25, 2007

Building & Installing MediaWiki

I was asked the other day to install a Wiki and I thought I would publish the steps required to get the Wiki up and running. You most probably aware the wiki side is the easy part, since it requires a lot of other software installed on your system.

I will do this on a Solaris 10 SPARC system and since I believe in not installing to much non standard O/S software I will try to keep it down to the bare bones, but there is still a lot to do:

What I will require:
  1. Perl
    • I will install the non Sun version, since I want this more up to date, plus I have published an install guide before, but I will update this for latest release.
  2. MySQL
    • I have a choice of databases including Postgres and both come with Solaris 10, but again I will install my own version. I have more expertise with MySQL than Postgres, but that is my choice.
  3. PHP
    • This is the key for the wiki.
  4. Apache Server
    • I will use latest version 2.2 , even thought I have always used Version 1.3 before.
  5. MediaWiki
    • I have a little expertise of it and after some studying I believe it is the easies to setup (We will see!).

On route I am sure I will end up install other software, but this is the main tools to get my system up and running.

Tuesday, November 22, 2005

Installing Perl & Apache on Solaris 10

One of the first things you will want to setup on your new Solaris/OpenSolaris operating system is a web server, even though Solaris now comes with Perl and Apache installed by default, it is still worth installing your own version. New versions of Perl and Apache will always be ahead of the Solaris version, plus you will never damage the pre-installed version.

The procedure has been test on:
  • Solaris 10 3/05 SPARC & X86
  • Fully Patched
  • Installed Solaris Software Companion (/opt/sfw)
The following steps will install:
  • perl 5.8.7
  • basic perl modules used by apache
  • Apache 1.3.34 (Version 1 is still widely used)

Step 1) Setup environment vaiables (Using csh):
# setenv PATH \
    /usr/sfw/bin:/usr/local/bin:/usr/bin:/bin
# setenv PATH \
    ${PATH}:/usr/ccs/bin:/usr/sbin:/opt/sfw/bin:.
# setenv LD_LIBRARY_PATH \
    /usr/sfw/lib:/usr/local/lib:/opt/sfw/lib
Step 2) Configure and install perl (Install location will be /usr/local/perl587)
# gtar xfz perl-5.8.7.tar.gz
# cd perl-5.8.7
# rm -f config.sh Policy.sh
# sh Configure -Dcc='gcc -B/usr/ccs/bin/' \
    -Dprefix=/usr/local/perl587 -des
# make
# make test
# make install
# cd ..
# cp /usr/local/perl587/bin/perl /usr/local/bin

Step 3) Check perl has been install and is in your path.
# rehash
# which perl
/usr/local/bin/perl
# perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=solaris, osvers=2.10, archname=sun4-solaris
... a lot more stuff....
Step 4) Install some basic perl modules (down load from: http://search.cpan.org/)
# gtar xfz HTML-Tagset-3.04.tar.gz
# cd HTML-Tagset-3.04
# perl Makefile.PL
# make
# make test
# make install
# cd ..

# gtar xfz HTML-Parser-3.46.tar.gz
# cd HTML-Parser-3.46
# perl Makefile.PL
# make
# make test
# make install
# cd ..

# gtar xfz URI-1.35.tar.gz
# cd URI-1.35
# perl Makefile.PL
# make
# make test
# make install
# cd ..

# gtar xfz Compress-Zlib-1.41.tar.gz
# cd Compress-Zlib-1.41
# perl Makefile.PL
# make
# make test
# make install
# cd ..

# gtar xfz libwww-perl-5.803.tar.gz
# cd libwww-perl-5.803
# perl Makefile.PL -n
# make
# make test
# make install
# cd ..
Step 5) Set up mod_perl (Need to extract apache files first, since it updates them):
# gtar xfz apache_1.3.34.tar.gz
# gtar xfz mod_perl-1.29.tar.gz
# cd mod_perl-1.29
# perl Makefile.PL \
    APACHE_SRC=../apache_1.3.34/src \
    DO_HTTPD=1 USE_APACI=1 \
    PREP_HTTPD=1 EVERYTHING=1
# make
# make install
Step 6) Previous step did not compile apache. I prefer it that way:
# ./configure --prefix=/usr/local/Apache/1334 \
    --enable-module=info \
    --enable-module=most --enable-shared=max \
    --enable-module=status \
    --enable-module=so \
    --activate-module=src/modules/perl/libperl.a

# make
# make install
Step 7) We will pause here, since if you try to start the apache server you will get an error if this is on a SPARC platform.
# /usr/local/Apache/1334/bin/apachectl start

Syntax error on line 210 of /usr/local/Apache/1334/conf/httpd.conf:

Cannot load /usr/local/Apache/1334/libexec/mod_negotiation.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/Apache/1334/libexec/mod_negotiation.so: symbol __floatdisf: referenced symbol not found
/usr/local/Apache/1334/bin/apachectl start: httpd could not be started

Step 8) SKIP to "step 9" if you are on a x86 platform.
# cd src/modules/proxy
# ld -G -o mod_proxy.so mod_proxy.lo \
    `gcc -print-libgcc-file-name`
# cd ../standard
# ld -G -o mod_negotiation.so mod_negotiation.lo \
    `gcc -print-libgcc-file-name`
# cd ../../..
# make
# make install
Step 9) Test that it all works
# /usr/local/Apache/1334/bin/apachectl start
http://localhost:8080
You will need to read other documention about configurations changes you can make to apache, but now you have a working version to use.

Hope it will helped some people and if there are any errors or commenst please be in contact.

Wednesday, October 26, 2005

Installing StarOffice 8 on a Solaris NFS client (workstation)

As you are all away StarOffice 8 is now out it looks good, but you may find out that integrating the software into GNOME/CDE on a Solaris/OpenSolaris workstation after install the software on a NFS server. If you are happy to install the whole (400MB+) on every workstation then you don't have to worry about this problem.

With StarOffice 7 you could install the software once on your network and then run the simple command on all workstations "/usr/dt/bin/dtappintegrate -s /opt/staroffice7" which would integrate it with your windows system. This feature was replace in the new version with packages, which seems a better idea, but it does not work 100%, since it needs a bit of manual work.

The procedure you will require is:

1) Install StarOffice 8 on your NFS server. (Keep the unpacked files, usually located in
/var/tmp/unpack_staroffice/packages)

2) On your workstation mount the software filesystem i.e.
# mount server:/opt/staroffice8 /opt/staroffice8
# mount server:
/opt/adabas /opt/adabas

3) Install the following packages if they don't already exists on your system (location can be found from step 1): Solaris 10 already has then installed so you can skip this.
SUNWj5cfg JDK 5.0 Host Config. (1.5.0_03)
SUNWfreetype2 FreeType2 Font library
SUNWj5rt JDK 5.0 Runtime Env. (1.5.0_03)

4) Install the following packages:
SUNWstaroffice-desktop-integratn Desktop integration for StarOffice 8
SUNWstaroffice-shared-mime-info shared mime info updates for StarOffice 8

5) Next step is a manual process to merge the contents of /etc/mailcap and /etc/mime.types on the client with the ones on the server. This was automaticly done on the server installation, since the package "
SUNWstaroffice-desktop-int-root" did it. But this can not be installed on a client: [I just copied it from the server]
/etc/mailcap
/etc/mime.types
6) Finally, add a link:
cd /etc
ln -s /opt/staroffice8 staroffice8

I have talked to Sun about this problem and I belive they are going to look into it. I guess they did not bother about this setup thinking that we would install all the software on all workstation,
which I guess what the PC people are going to do, but UNIX people don't do this!

Hope this helps others.

Thursday, October 13, 2005

My First Blog

This is nothing to read here, but give me time and I am sure there will be more.