Tuesday Apr 14, 2009

Scaling Olio on Sun's Nehalem Systems and Amber Road

I introduced Olio a little while ago as a toolkit to help web developers and deployers as well as performance/operations engineers. Olio includes a web2.0 application as well as the necessary software required to drive load against it. Today, we are showcasing the first major deployment of Olio on Sun's newest Intel Nehalem based systems - the SunFire X2270 and the SunFire X4270. We tested 10,000 concurrent users (with a database of 1 million users) using over 1TB of storage in the unstructured object store.

The diagram below shows the configuration we tested.


The Olio/PHP web application was deployed on two X2270 systems. Since these systems are wickedly fast, we also chose to run memcached on them. This eliminates the need of having a separate memcached tier. The structured data in Olio resides in MySQL. For this deployment, the database used MySQL Replication and was deployed using one Master node and 2 slave nodes - all nodes were X4270 systems. The databases were created on ZFS on the internal drives on these systems. The unstructured data resides on a regular filesystem created on the NAS Appliance AmberRoad - Sun Storage 7210.

I think this is a great solution for web2.0 applications - the new Nehalem servers are extremely powerful allowing you to run a lot of users on each server, resulting in a smaller footprint and easier deployment and maintenance. Of course, this requires a little more effort in terms of tuning the software stack to ensure it can scale and utilize the CPU effectively.

The entire configuration, tuning informantion and performance results is documented in details in a Sun Blueprints titled A Web2.0 Deployment on OpenSolaris and Sun Systems. So check it out and let me know if you have any questions or comments.

Friday Mar 20, 2009

FreeImage and ImageScience on OpenSolaris

Although rails is a great development environment for web applications, for a newbie the deployment of a rails application can be challenging due to the myriad dependencies on various gems, native libraries etc.

image_science is one such ruby library that provides an easy way to generate thumbnails. It is therefore quite popular in web2.0 type applications (there isn't a site today that doesn't let you upload photographs of yourself, your pets, gadgets, whatever).  It is a very simple implementation and available as a ruby gem and so easy to install. However, the real work is done by a native library called FreeImage and installing this on OpenSolaris is a little bit of work. Although, I use OpenSolaris here, the instructions apply to Solaris 10 as well if you are using ruby from Web Stack.


FreeImage


I found instructions from Joyent to build FreeImage on OpenSolaris but found them to be erroneous. To install FreeImage, do the following :


  • Download the source from the repository using the command :
  • cvs -z3 -d:pserver:anonymous-AT-freeimage.cvs.sourceforge-DOT-net:/cvsroot/freeimage co -P FreeImage
  • Edit FreeImage/Makefile.solaris :

    • Change INSTALLDIR to /opt/local

    • Change all the lines for the install target as follows:
    • install:
              install -m 644 -u root -g root -f $(INSTALLDIR)/include Source/FreeImage.h
              install -m 644 -u root -g root -f $(INSTALLDIR)/lib $(STATICLIB)
              install -m 755 -u root -g root -f $(INSTALLDIR)/lib $(SHAREDLIB)
              ln -sf $(INSTALLDIR)/lib/$(SHAREDLIB) $(INSTALLDIR)/lib/$(LIBNAME)



  • Make all the install directories:
  • mkdir -p /opt/local/lib /opt/local/include
  • Ensure you have gcc in your PATH (it's in /usr/sfw/bin).

  • Now we are ready to build the library:
  • gmake -f Makefile.solaris
    gmake -f Makefile.solaris install

If everything went smoothly, you should see the following files in /opt/local:
# ls /opt/local/include
FreeImage.h
# ls -l /opt/local/lib
total 13538
-rwxr-xr-x   1 root     root     2978480 Mar 17 13:35 libfreeimage-3.12.0.so
-rw-r--r--   1 root     root     3929756 Mar 17 13:35 libfreeimage.a
lrwxrwxrwx   1 root     root          22 Mar 17 13:43 libfreeimage.so.3 -> libfreeimage-3.12.0.so

ImageScience


Now that we have FreeImage installed, installing ImageScience itself is real easy. But first, make sure you have the latest version of rubygems (1.3.1). The default rubygems in OpenSolaris 2008.11 is 0.9.4.
# gem --version
0.9.4
# bash-3.2# gem install rubygems-update
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rubygems-update-1.3.1
# update_rubygems


This will print a lot of messages, but when it's complete you should have rubygems 1.3.1.
# gem --version
 1.3.1


We can now install the image_science gem. This will automatically install all dependent gems so the messages you see depends on what you have installed. On a OpenSolaris 2008.11 system you should see :
bash-3.2# gem install image_science
Successfully installed rubyforge-1.0.3
Successfully installed rake-0.8.4
Successfully installed hoe-1.11.0
Successfully installed ZenTest-4.0.0
Successfully installed RubyInline-3.8.1
Successfully installed image_science-1.1.3
6 gems installed


This will be followed by more messages indicating documentation for the above modules was also installed.

You are now ready to use image_science. Have fun !

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.


ruby


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 rbconfig.studio 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. 


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 Sep 18, 2007

Cool Stack 1.1.1 contents

We are currently working on Cool Stack 1.1.1 which will have the following components updated, in addition to fixing known bugs :

  • Apache 2.2.6 : Add mod_proxy, mod_fcgid, SMF support
  • PHP 5.2.4      : Add dtrace extension, add new fastcgi version for use with non-Apache webservers
  • APC 3.0.14
  • Suhosin 0.9.20
  • MySQL 5.0.45: Add SMF support
  • Perl 5.8.8       : Add Sys:Syslog, DBI, DBD-mysql extensions
  • memcached 1.2.2
  • squid 2.6
  • tomcat 5.5.23
I would love to get feedback on this. Is your favorite module/extension missing ? Are there bugs/issues you have run into that haven't been reported on the forum ?

About

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.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today