As with anything else, there are advisable and not-so-advisable ways to tune WebSphere App Servers (WAS) to make them whistle a happy one.
Candle Corp. Senior Solution Architect Michael Pallos offered many tips in the expoQ webinar Best Practices For WebSphere Application Server and Database Performance Tuning, part of the Best Practices for WebSphere series, sponsored by Candle.
Pallos began giving answers by saying there is no one answer. “No one solution fits all organizations. Our industry doesn’t have the knowledge required to build a single architecture to satisfy all business requirements. And perhaps it never will, because corporations are different, they choose to operate differently, and there’s a vast array of diverse business requirements driving our technology. So with these best practices we’re going to talk about today, most likely anyone out there will be able to give me a valid business reason that, in your organization, you wouldn’t want want to incorporate a specific best practice. And you’d be correct.
“But at the same time, there are multiple themes and things we can incorporate as best practices to optimize a Websphere environment.” And, added Pallos, the WebSphere database (persistence) layer offers lots of opportunities for optimization.
Saying he’d be focusing on the persistence layer, Pallos pointed out that if your organization is running WebSphere AE (Advanced Edition), it’s probably using three databases: the administration repository (configuration database), a persistence database (if session persistence is being employed), and the business information database, which provides persistence of business transactions and entities and is the business record.
Pallos noted that the interaction of those databases helps determine the WAS performance level. Web users’ unpredictable usage patterns and shorter interaction times place more demands on the database connection, but optimizing WebSphere App Servers (WAS) can bring back-end order to even the most chaotic end-user environment.
Pallos suggested a half-dozen best practices:
- Connection Pooling: “Always use it,” Pallos ventured. “It’s at least three-times faster if you incorporate Connection Pooling into your application.” And if done properly, Connection Pooling enables users to “play well with others.” Specifically, Pallos suggested:
- obtaining and closing connections in the same method
- developing separate methods for expensive JNDI lookups
- not declaring connections as static objects
- not closing connections in the finalize method
- closing connections you open “to maintain good application development practices, and more importantly, users will (otherwise)experience long delay times”
- not managing data access in Container Managed Persistence beans.