Archive for August 2007

JVM Options

August 31, 2007

Stumbled across a great resource for the different options for JVM tuning the other day…A Collection of JVM Options. Definitely worth bookmarking if you ever need to do some Java tuning!


Library Find

August 29, 2007

Stumbled across LibraryFind the other day and have been playing around trying to get it installed. I’ve not had many good experiences with Ruby based apps, but this looked really promising so I took the plunge. Unfortunately the searching doesn’t work because and just states that there was an error. Looking in the log files, it states that its “missing default helper dispatch_helper” and the record_set_helper. I also ran into a problem in the admin module when I attempted to add a target…just got a recordschema error. I ended up just writing a script to install a couple of EBSCO targets we had, but hopefully once I figure out what’s going on with the helpers, that problem will be resolved too.

Embedding Google Maps

August 23, 2007

Google has made it very easy to embed a functional Google map into any web page or blog.¬† “Users can drag and click or zoom in on a location, and view it in map, satellite, and hybrid modes.”

Read the press release here: Google announces a simple new way to embed Google Maps.

Benchmarking Solr

August 16, 2007

There was some discussion on the Vufind about moving from Tomcat to Jetty. I first wanted to see if it was possible to run this so I got the latest nightly build from Solr to see which packages were needed to run the server. I then grabbed the latest Jetty (6.1.5) since the version in Solr’s build was 6.1.3. I packaged the same files that were in Solr’s distribution and dropped Vufind’s schema and config file into Jetty and fired it up. Voila…it worked like a champ.

The thing I really wanted to know is if this Jetty version would perform in a similar fashion to Tomcat. What I did to test was set up two visualized servers on the same box. Each were set up with the exact same hardware (2GB RAM, 1 processor, bridged 1GB network, running Ubuntu 7.04 server). I also used the same Java tuning on both machines (“-server -Xmx1024m -Xms1024 -XX:+UseParallelGC -XX:+AggressiveOpts“). The only difference between the two was that one ran Tomcat and the other Jetty.

For the test, I indexed our library’s 1.8+ million catalog records on both machines which both chewed through the records in about 9 hours. To do the actual testing, I used JMeter to query both systems at the same time using a few scenarios that I thought might possibly be “real.”

In the first test, I sent 10 users with 100 queries for the book title “Flashman” to see what happened. I was pretty impressed with the results:

Server Samples Average Median Min Max
Jetty 1000 4ms 4ms 1ms 17ms
Tomcat 1000 3ms 4ms 0ms 28ms

You know, we might get a few more users than just 10 at a time, so I ramped it up to 100 users doing 10 queries. Again, there wasn’t much of a difference.

Server Samples Average Median Min Max
Jetty 1000 12ms 8ms 1ms 565ms
Tomcat 1000 9ms 7ms 1ms 530ms

Now to really ramp things up with 100 users doing 100 queries

Server Samples Average Median Min Max
Jetty 100000 9ms 6ms 1ms 2349ms
Tomcat 100000 9ms 6ms 1ms 1844ms

And, just for kicks, 1000 users with 10 queries

Server Samples Average Median Min Max
Jetty 10000 32ms 6ms 0ms 5643ms
Tomcat 10000 26ms 5ms 0ms 4295ms

With median results within a millisecond of each other, Andrew went ahead and swapped out Tomcat in favor for Jetty for its smaller footprint. I have to say that any time I’ve needed to do anything with JSP, I’ve opted to go with Tomcat. More because I know the name, but I think I’m going to keep Jetty on my list from now on! I want to take a closer look at their ANT and Eclipse Plugins!

Breaking Windows

August 12, 2007

Wayne and Phil finally convinced me to switch operating systems on my office laptop. Wednesday they gathered around me as I took a deep breath and pressed enter to launch the installation of the Ubuntu version of Linux. Afterwards they led me, rapidly, through the installation of various applications and repositories using the command line interface and using the Synaptic Package Manager. I installed VMserver to run the few Windows applications I need, like the Unicorn client, Workflows. Next I need a book to achieve some independence. Right now it is still “Hey Wayne, how do I …” and “Wayne, why is it doing …”

I copied all my documents to another server prior to installing Ubuntu. From there I burned everything to CD. I find it liberating to be free of all the junk I had installed on my laptop and all the documents I had accumulated but not looked at for years. I still have the documents if I need them but I am greeted by a very clean desktop.

I think I am going to start using Google documents more. I like the ability to quickly share. Ubuntu automatically installs OpenOffice so I can easily create local documents.

Day-by-day use of Ubuntu is nothing I have to think about. I only have seven application icons on my toolbar: Synaptic Package Manager, Firefox, Help, VMserver console, Pidgin, Thunderbird, and a terminal window.

My desktop¬† only has folders with the Unicorn API documentation, and two links to our shared library network drive. One is an ssh link and the other is a Windows share. I only mounted the Windows share because there were some permissions issues when I was transferring files around. These links give me very quick access my folders and documents stored on the library’s shared network drive.

Before Ubuntu, I was not able to get a connection to my home wireless network. No matter what steps I took, which wizards I used, I couldn’t get a connection. When I brought home my laptop with Ubuntu I was connected in about a minute because that is how long it took to key in my pass code. Amazing.
We will see what unfolds over the next weeks but I’d say that I’m a Linux convert.


August 2, 2007

I use this blog to promote technology within MPOW but this article annoyed me: MySpace, SecondLife, and Twitter Are Doomed. When I first read it, I came away with an impression of schadenfreude on the part of the author. I let the article sit for a couple of days and re-read it and am still annoyed by the tone.

Sure there are problems with Myspace, SecondLife, and Twitter. I’ve pretty much abandoned MySpace for Facebook because there is a growing librarian community there and I gain value from using it. Until I learned how to tweak my profile in MySpace, I was bombarded with messages from young women who wanted to be my friend and, by the way, please look at these photos of me. SecondLife is slow and kludgey but it has put me in contact with more people than would otherwise be possible. I’m not sure how I could have participated in a book discussion led by a British physics professor who was in Brazil and attended by people from around the world. Twitter? Well, I don’t get the appeal there either but it doesn’t bother me that it exists.

The author is quite correct in pointing out that there are problems with these social applications and that they may/will eventually disappear. I say, “So what.” All of the social networking applications are evolutionary steps. Some will work, some won’t. I believe that there are people looking at these applications and thinking, “OK, the concept is interesting but I bet I can make it better, faster, stronger and maybe I can combine the best elements of several into a new approach for social networking.” You have to have a foundation to build anything and the current crop of social networking applications are a foundation for future applications.

Sure the press hypes these applications but again, so what. Hype is what lets people know something exists. Hype is what might get a developer interested in looking for ways to improve on a concept or develop a new approach for these social networking applications. Look at what is happening in Facebook. It is becoming a platform where new third party applications are being built daily. You can add your Twitter, Flickr, Google Reader accounts, etc., effectively making Facebook the first application you want to open in the morning.

The author concludes, ironically – Till the next “Big Thing.” I say “Cool, I can’t wait to see what comes along.”

Java Tuning for VuFind

August 1, 2007

Had a few more notes on running VuFind.

Java Tuning

Something that is generally looked over when setting up a Java application is tuning Java. This can be a very daunting endeavor as you generally see tutorials that reference things like interpreting p-values and power analysis. However, if you’re just wanting to set an application up, this is a much larger investment of time and effort that is really needed. So, here are some things you probably want to do.

To set the Java ergonomics for server applications, you simple set a new environmental variable. For Tomcat, this is the CATALINA_OPTS. For development boxes, I tend to make these global variables, but as long as the user account that’s running VuFind’s Tomcat instance has CATALINA_OPTS defined, you’ll see the performance boost.

For those who can’t wait, this is what I set for my instance in a visualized instance of Ubuntu server (Feisty) that runs with 2 GB RAM and a dedicated dual-core x86_64 processor.

CATALINA_OPTS="-server -Xmx1024 -Xms1024 -XX:+UseParallelGC -XX:+AggressiveOpts"

I don’t have any heuristics on the improvement, but it is a noticeable difference in both speed and processor utilization.

Without attempting to rehash the nitty-gritty of the ergonomics of the JVM, you’re bascially telling Java to act as a server, use a statically sized heap (the memory allocated for object storage), uses young-generation garbage collection (it divides garbage collection across processors), and turning on point release performance optimizations.

For more info on setting up the JVM to be “server-class”, check out the Java Tuning White Paper. While this paper specifically refers to the Java 5 platform, these same options will work if you’ve deployed under Java 6.