Identifying bottlenecks with YourKit

First of all I would like to thanks on behalf of the Apache Camel committers, Anton Katilin from YourKit as he was so kind to donate OS licenses to their excellent profiler.

It comes handy as we have planned to look performance tuning Apache Camel 2.0.x.

However it was actually in another matter YourKit proved itself. The FUSE team had identified a performance bottleneck in Camel 1.6.0 in a special situation when using the recipient list EIP together with a simple expression that where using headers with the Integer type. That special cocktail degraded the performance. With the aid of YourKit and digging into the open source code at Apache Camel I was able to identify the bug within the hour.

And YourKit could even help pin pointing that when the recipient list only contains one destination we could avoid using java.util.Scanner as it had an impact on the performance as well.

Working together with the FUSE team quickly resolved the issue and we could reassure the customer with a workaround and that the problem is fixed in the next release. Thanks to our dedicated team of on site consultants we can react quickly and ensure high quality when Camel is used in enterprise scales as this particular customer is.

Well this blog is a praise for YourKit. Installing it is only a breeze on the Mac OS as its just the usual download and drag to applications. And when its starting it can integrate to IDE. That allows me to just start IDEA and find an unit test and click the profile button, thats it!

Then I can browse the YourKit application and see all kinds of stats. It got a "hot spot" button to help quickly pin point quick wins as well.

We have setup a wiki page for the Camel 2.0.x performance tuning experiments. So if you have ideas or want to help out take a look. We got a branch in SVN with the actual code experiments we are doing - and yes we use YourKit to help us.

1 comment:

Christopher said...

YourKit is great and I've been using it for my v.1.x Camel based development for a month or so. I found a resource consumption due to a bug in my application logic - all down to YourKit.

From a Camel perspective, following the guidelines that I wrote about in my blog allows you to run your Camel application as a regular Java application. In this scenario it is very easy to launch the Camel application under YourKit. Otherwise you can launch your container with some special YourKit properties and then connect to it from the YourKit application.