Dec 17th, 2007, 08:20 AM
spring performance on Sun UltraSparc T2
We are working on a large project using Spring, Hibernate and JSF, and we are trying to decide which type of application server to deploy it on. We have been very happy with the performance on intel Xeon machines, but our system administrators are pushing Sun UltraSparc T2.
Benchmarks for this processor seem to be really good, but that is based on EJB applications. Can we expect similar performance with a pure POJO application, or is such an application more single-threaded, meaning a multicore CPU would not benefit it very much?
Dec 17th, 2007, 10:58 AM
I don't have any particular knowledge of the hardware you are referring to, but I'm a long-time Java developer and Spring user and can offer you some small amount of wisdom.
The first thing regards your question of whether a POJO-based application is "more single-threaded" and therefore would see less ROI from a multi-core processor. To that end, I can definitively say that any web application written in Java is multi-threaded by nature, regardless of whether the underlying implementation is POJOs or EJBs. This is because the web container itself is inherently multi-threaded. See the servlet spec for more details.
Now, Spring-based applications vary widely depending on the requirements and sometimes depending on the skills or preferences of those involved in their development, but by and large Spring applications consist mostly of stateless, thread-safe components. What this means is that most of the application components are created at startup and hang around for the life of the application and can safely be simultaneously utilized by multiple threads. What I'm getting around to saying is that most of the performance overhead of Spring itself is incurred at startup only.
Again, it will all depend on what features you're using and how you're using them. Spring certainly does get involved in the life of a request when using something like (for instance) binding and validation for form processing in Spring MVC. So here, we see Spring code that is not executing only at startup. Although I have no hard numbers for you, I can assure you that I've never known such modules to perform poorly.
I'd say what it all comes down to will be the strength of your developers. As great a technology as Spring is, what's true for all technologies is true for Spring as well- if it's leveraged responsibly, it can be your best friend; if it's abused it can be your worst nightmare.
Back to the processor issue (and I am by no means a hardware expert), IMHO, it's never a bad idea to have a multi-core processor on a server. Servers by nature are doing a lot of work and especially when it's clearly being used to host a web application, you can expect there will often be concurrent requests and the extra processing power will not go to waste.
I know this is all very abstract, but I hope it helps.