Friday Mar 20, 2009

First Olio Release

We have just released the first binary version of Apache Olio for both the PHP and Rails implementation. Both implementations have been tested quite thoroughly now and we think they are robust enough for serious use - especially for performance testing the workloads.

I introduced Olio in a previous post. It is a toolkit that includes a sample web2.0 application implemented in both PHP and Rails that includes a load generator to drive load against the application.

Please visit the Olio site and download the kits. If you find it interesting, I invite you to come join the project.

Wednesday Jun 11, 2008

Cool Stack 1.3 is here

It's finally here. Before you download the release, please do read the documentation. It's over a month late, but hopefully the features will compensate for the delay.
Almost every single component in the stack has been upgraded. Two new packages, CSKpython and CSKnginx have been added. And yes - the python package does include mod_python too.
You can read about the full list of changes in the Changelog.


Significant changes have been made to the ruby package. In addition to the upgrade to ruby1.8.6p114, we include a number of gems, notably mysql, postgres and mongrel. It should also be easy to install any new gem that requires native compilation using gcc - this should just work out of the box. A word of caution if you're running ruby on SPARC. Please DO NOT use gcc. If you're importing native gems, take the extra step of installing Studio 12 and use the instead (simply rename it to rbconfig.rb after saving the current one). This file is located in /opt/coolstack/lib/ruby/1.8/sparc-solaris2.10.

There have also been significant performance enhancements for ruby made in this release. By changing compiler flags, we have measured 20-30% improvement. In addition, SPARC-specific patches (which are now in ruby 1.8.7) improve performance a further 8-15%. If you are a ruby user, let us know your experiences. I'd love to hear of any performance changes you see as well.
In a future post, I'll share some performance results on the AMP stack. But for now, please try this release and let us know what you think via the forum or comments on this blog.

Cool Stack installation in Zones

For users who have installed Cool Stack in zones, I know the upgrade is a painful process. As I mentioned earlier, we do hope to fix this situation by allowing upgrade installs in future. But some users have found solutions on their own. In particular, I found this post in the forum interesting. Scroll down to reply 19.

Monday May 19, 2008

Where is 1.3?

I know many of you may be wondering why Cool Stack 1.3 isn't out yet, so I thought I'd post an update on where we are with the release. When I first started talking about this, I was hoping to get the release out in early May. But several things have colluded to cause a delay.

  1. We took on a lot for this release. Although just looking at the proposal, it may seem like a simple matter to just update the versions of the various components, underneath the hood, we decided to do a lot more streamlining of the build and packaging process.  Since so many version updates were involved, that also meant more legal approvals.
  2. We have a more formal QA process for this release (and for future releases). The good news is that this means we will have a more quality release, but the bad news is that it now takes more time as we have to go through a couple of QA cycles at least to qualify the release.
  3. We are going to institute a patching process for releases going forward. What this means is that we can put out patches for critical bugs and provide an upgrade path for existing installations. This should especially prove useful to users who have installed in zones. Before everyone starts jumping up with joy, I want to mention that for 1.3, you will still have to go through the pain of a fresh installation after saving your config files and re-applying them. But going forward, say for 1.3.1 or 1.4, we will provide an upgrade option, so please bear with the pain for this one release.
  4. And there is now talk about making Cool Stack into a more full-fledged product with proper production support. This is one of the major reasons for all of the above enhancements and the cause of the delay, but we have got so many requests for production support now, that we felt it was worth taking the time to do some ground work to make this happen.
  5. Just to be clear, we will continue to provide free support through the Cooltools forum as we are doing now, and we hope more of you will help us out on the forum. We know there are many experienced Cool Stack users out there - if you think Cool Stack has saved you time, we hope you will consider giving back a little of your time to the forum. We have one full-time engineer assigned to the project and a few other Sun engineers who are interested in Cool Stack's success contribute our time.  We are really short-staffed, so please, please do consider sharing your knowledge and helping out other Cool Stack users.

After reading all that, I know the big question still is : When will 1.3 be released ? We have just finished incorporating almost all components and are starting QA of build2. We have a few more things to take care of but I'm hopeful that we can get this out in the first week of June.

Thanks for your patience and your support of Cool Stack. Please do keep your feedback coming and subscribe to the forum. 

Monday Nov 05, 2007

PHP dtrace extension for Cool Stack 1.2

We have fixed the issue with the PHP dtrace extension not working in Cool Stack 1.2. As I mentioned in my announcement post, we had already identified the issue but didn't have time to fix it before the release. The issue was that /usr/ccs/bin/ld was being used to do the linking but this doesn't work for dtrace as some initialization code needs to be called from the .init section and this is not setup correctly if we don't use 'cc' to do the linking (rather than 'ld'). 

So a simple addition to the configure line:

did the trick.

We now have two files : and posted. Download the one for your machine and do the following :

  • Copy it to the php5 extensions directory of /opt/coolstack/php5/lib/php/extensions/no-debug-non-zts-20060613 and re-name it as
  • Add extension="" to your /opt/coolstack/php5/lib/php.ini. 

See my earlier post, for an example of how to use dtrace to trace through the AMP stack. 

Friday Nov 02, 2007

Cool Stack 1.2 Released

Finally, it's here. We missed our October 31 deadline, but hopefully that won't matter when you see the contents of the release.

Short summary of changes in the 1.2 release.

You can download the new packages from the Sun Download Center.

Some caveats to be aware of :

  • These packages will over-write Cool Stack 1.1 packages that you may already have installed. All packages continue to install in /opt/coolstack but some of the package names have been changed. Thus, pkgadd(1M) will not know that the new CSKapache2 package will install in /opt/coolstack/apache2 and over-write the contents from a previous Cool Stack 1.1 installation of CSKamp. So, please do save your current installation. A detailed strategy to do this is  defined on the Cool Stack site. Here are some other short-cuts :
    • Move /opt/coolstack to /opt/coolstack1.1. Remove all the CSK\* packages installed. Since the actual files in /opt/coolstack no longer exist (as you've moved the directory), pkgrm will do no harm but does change the system's perception of what packages are installed. Then delete /opt/coolstack and start installing the new packages.
    • Save just the files you need - typically apache2/conf directory, your php.ini file etc. Then remove all the CSK\* packages and delete /opt/coolstack.
  • This release was built and tested on Solaris 10. During final testing on Nevada (aka OpenSolaris or SXDE), we ran into package incompatibility issues. Some packages do not install in a straight-foward manner on OpenSolaris. Please use the work-around.
  • The php dtrace extension doesn't work. We have identified the fix and will post a patch soon.

As always, please do read the FAQ (we will be updating this as we get feedback about the new release) and if that doesn't help, post your question/problem on the CoolTools Forum.

Let us know what you think of this release via the forum, the feedback alias or this blog. If we don't get feedback, it is hard to know what components to include or what bugs need to be fixed.

Tuesday Oct 16, 2007

Cool Stack on Niagara 2 Systems

Sun recently announced the Sun SPARC Enterprise T5120 and T5220 and Sun Blade T6320 systems based on the UltraSPARC T2 processor.  You can find lots of information on the various features and functionality provided by these servers.

One other cool feature is that these systems ship with Cool Stack pre-loaded. The Cool Stack 1.1 packages are available in /var/spool/pkg. You can install the ones you want using the pkgadd(1M) command as follows :

root@wgs40-82 # cd /var/spool/pkg
root@wgs40-82 # ls
CSKampSrc_sparc.pkg        CSKphplibs_sparc.pkg
CSKamp_sparc.pkg           CSKrubySrc_sparc.pkg
CSKmemcachedSrc_sparc.pkg  CSKruby_sparc.pkg
CSKmemcached_sparc.pkg     CSKsquidSrc_sparc.pkg
CSKmysqlSrc_sparc.pkg      CSKsquid_sparc.pkg
CSKmysql_sparc.pkg         CSKtdsSrc_sparc.pkg
CSKncursesSrc_sparc.pkg    CSKtds_sparc.pkg
CSKncurses_sparc.pkg       CSKtomcat_sparc.pkg
CSKperlSrc_sparc.pkg       Changelog.txt
CSKperl_sparc.pkg          CoolStack1.1_sparc.pdf
CSKphplibsSrc_sparc.pkg    LICENSE.txt
root@wgs40-82 # pkgadd -d CSKamp_sparc.pkg

The following packages are available:
  1  CSKamp     Apache httpd, PHP and MySQL
                (sparc) Apache 2.2.3, PHP 5.2.0, MySQL 5.0.33

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Friday Jun 01, 2007

Debugging AMP

In a previous post, I mentioned the availability of the dtrace extension for Cool Stack's PHP.  Using this extension and the Cool Stack MySQL, it is possible to analyze the performance of your application running on this stack. At JavaOne, we demoed this using the open source MediaWiki and SugarCRM applications.  dtrace is especially useful in analyzing complex multi-tier applications like AMP. Thanks to Angelo Rajadurai for the creation of the scripts that I describe below.

Analyzing PHP calls

So, let's look at a simple dtrace script that counts how many times a particular PHP function is called :

#!/usr/sbin/dtrace -Zqs


You can copy the above to a file named php.d and start it just before the operation you want to analyze. For example, if you want to see which php functions are called when you click on Edit in your mediawiki site, start the script, click the link, then terminate the script via \^C.

Analyzing MySQL calls

The following script will print the SQL command issued by the mysql process. Invoke the script with the pid of the mysqld process as an argument, just before you execute the operation you want to debug.

#!/usr/sbin/dtrace -qs

/\* This program prints the SQL commands executed by MySQL
 \* process. It takes the pid of the mysqld process as its
 \* only argument.
 \* This script observes the occurance of dispatch_command()
 \* function and prints the SQL statement (arg2). Before you
 \* use this D-script replace the mangled name below with the
 \* output run from the mysql bin directory :
 \*/usr/ccs/bin/nm mysqld | awk -F '{ print $NF; }' | grep dispatch_command



Tracing thru PHP & MySQL 

Finally, here's a script to trace through both the PHP and MySQL calls. The output is color-coded : blue for PHP functions and green for MySQL functions (admittedly there are many different ways to format the output and this one's a bit of a hack - but it works). This script should be passed the pid of the mysqld process as an argument. Note that this script assumes that both PHP and MySQL are running on the same system. If they are running on different systems, then you will have to run the individual scripts shown above on the different systems.

#!/usr/sbin/dtrace -ZqFs

/\* We use terminal escape sequence to change color
 \* PHP - Blue
 \* MYSQL - Green


        self->sql = copyinstr(arg2);




I'm a Senior Staff Engineer in the Performance & Applications Engineering Group (PAE). This blog focuses on tips to build, configure, tune and measure performance of popular open source web applications on Solaris.


« July 2016