Monday, September 29, 2008
Web Service Performance Improvements in WAS V7.0 (up to 3x)
Two weeks ago, I said I'd be doing a weeklong series of posts on WAS V7.0 performance. A week late, but here we go. I guess I can say I delayed until WAS V7.0 was generally available, which it is now (trial download here)! WAS V7.0 should be available by other supported download methods as well.
There are many impressive areas of performance improvements in WAS V7.0, but I'll start with the one nearest and dearest to my heart - Web Services. In the past, I talked about web services performance through the years. I mentioned a possible follow-up blog post on what Feature Pack for Web Services performance. I never followed up on that (hrm, a theme in my slow blogging), but now that the same code is available in WAS V7.0, I will. In fact, we've made even more improvements to web services performance in WAS V7.0 that would truly make the "performance through the years" chart from my previous blog post much more impressive.
WAS V6.1 supports the J2EE 1.4 JAX-RPC web service programming model. Last year, we added Java EE 5 support for the JAX-WS web service programming model (expanded functionality, standards support, easier programming model, and enhanced management support for services) through the Feature Pack for Web Services. While WAS V7.0 continues support of both the JAX-RPC and JAX-WS programming models so that existing JAX-RPC web services applications deployed on previous versions of WebSphere will run on V7 unmodified, the development and performance resources were almost exclusively dedicated to the JAX-WS work. We encourage customers to move to this new programming model to take advantage of the new features as well as the significant performance gains. Many customers I know of have moved to the Feature Pack for Web Services already, but now that it's natively supported in WAS V7.0, I expect even more customers to make a move from JAX-RPC to JAX-WS.
The chart below compares WAS V6.1 JAX-RPC performance to WAS V7.0 JAX-WS performance. JAX-WS web services significantly outperform JAX-RPC web services for all message payload sizes shown. For a 3k(input)/3k(output) message size, JAX-WS achieves a 70% higher throughput and for 10k/10k message size JAX-WS achieves over 2x higher performance. For 10k/3k, 10k/10k, 100k/100k JAX-WS achieves over 3x/2.5x/2.5x higher performance, respectively.
There are many reasons for these performance gains, but the most significant one is the optimized data binding using JAXB in JAX-WS. JAXB provides JAX-WS the framework to unmarshal XML documents into Java objects or marshal Java objects into XML. We have done very impressive optimizations in our JAXB implementation to achieve these performance gains, well beyond what most JAXB implementations can do with StAX or SAX. Getting high performance XML parsing combined with JAXB's full support for XML Schema is an impressive accomplishment.
Some things that matter to you specifically: This is a primitive benchmark as it only measures web services performance (no business logic). Therefore, your application using web services will not go 2-3 times faster just by switching to JAX-WS and JAXB, but it should markedly improve. Specifically the additional latency involved in exposing business logic to web services and XML should go down by 1/2-2/3, which in many scenarios is substantial. Also, even though you can handle XML yourself in JAX-WS by getting the data as a stream or DOM, it's best if you use JAXB as you'll get the most performance benefit of our optimizations.
I'm interested in feedback from users that have tried the new engine.