Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

The Performance Dragnet

The Performance Dragnet

For any organization, the two fundamental requirements for ensuring that enterprise applications meet high standards for performance are the ability to monitor the application with near-zero overhead and the ability to determine the root cause of problems quickly when they arise, regardless of whether the application is in QA, staging, or deployment.

The stories you are about to read are true. The names have been changed to protect the (sometimes not-so) innocent.

This article is the documented drama of actual Java performance problems. It begins with a summary of Wily's Enterprise Java Application Management solution and the role it plays in pre- and post-deployment performance analysis. Then I'll look at true stories of performance gone bad. You will learn - the easy way - why skipping Java application management doesn't pay.

The Wily 4 Solution
As a healthy organization matures, it will naturally develop a set of strategies and processes for eliminating the amount of turmoil it has experienced in fighting performance problems associated with its mission-critical Java applications. These organizations also understand the heavy cost associated with poor application performance: the returns on IT investments, the risks to the organization's revenue stream, and ultimate customer satisfaction.

The Wily 4 solution from Wily Technology allows enterprises to monitor, improve, and manage enterprise Java applications in each stage of the application life cycle. It provides a common language that each department within an IT organization can use to quickly identify and fix Java application performance problems when they arise.

With Wily 4, IT teams can monitor the business function of their production applications 24/7, isolating performance bottlenecks in fund transfers, bill payments, purchase of goods, and other core use cases - all of which can be mapped, without source code changes, onto the underlying methods of the servlets, JSPs, EJBs, and custom code that implement them. Customizable dashboards and a wide variety of options for integration make Wily 4 a perfect complement to popular systems management solutions. It allows organizations to publish Introscope Alerts with information about the availability of the production application's customer functions right into their existing operations' problem resolution pipeline (see Figure 1)

Key elements of the Wily 4 solution include Introscope, its flagship Java application monitor; Introscope LeakHunter for identifying the potential sources of memory leaks in production systems; and Introscope Transaction Tracer for solving performance problems associated with individual transactions. The Wily 4 solution also includes Introscope SQL Agent and Introscope PowerPacks for identifying application performance problems associated with the connections between Java applications and supporting back-end systems. Together, these solutions offer a "whole application" view into the entire Java environment.

The Performance Dragnet: Setting and Achieving Performance Goals
As a best practice, organizations use Wily's Introscope to benchmark and record the responsiveness of an application's key components to achieve performance goals. Successful development and deployment of enterprise Java applications should include continual baseline measurements of core use cases even as they are developed. As developers add and commit changes to an application, these baselines provide hard, statistical means by which each subsequent build of the application can be evaluated. If you fail to watch carefully through each step of the development process, you can end up with bugs or, far worse, architectural bottlenecks that are far more costly to fix in staging or production.

Like a good detective, a good baseline or benchmark just keeps asking the same questions until it gets the answers it wants. This kind of process encourages a "measure twice, cut once" approach that has proven itself time and again as the most effective means of improving software performance.

To successfully load all the key use cases of an application, the application must be fully functional; a good set of performance load-generation scripts can double as excellent sanity checks for functional availability of core application features.

Once the application is under load, organizations need to be able to continuously monitor the application's performance - at a feature level - to identify bottlenecks, especially during the first few months of production. Wily's Introscope can abstract the details of your Java metrics into views and reports that actually describe the application's features. In the ubiquitous PetStore example, this would be metrics about purchase of goods, return of receipt, view of catalog items, inventory search, and so on. Taking this approach, you're not just tuning a component because it is slow, but because you have observed that it makes the time for return of a customer's receipt take unacceptably long. Without this kind of a view, you risk wasting valuable development time on tuning features that may not be as important to the application's overall success.

Wily's Introscope reports the call volume, mean, minimum, and maximum response time of all the key components of the customer's applications. Introscope can also measure concurrency (a measure of the threads busy in each method or component of business logic), memory statistics, file and socket i/o statistics, pooled resource utilization statistics (e.g., MQ connections), environmental statistics, and more.

In the prototypical J2EE application, the controller servlet, model EJBs, back-end connector APIs (e.g., JDBC, MQ Series, etc.), and view JSPs would be measured. Organizations often take the additional, simple step of customizing Introscope so that they can monitor, without source code changes, their own proprietary business logic implementation or back-end connectors. For example, Introscope has monitored SABRE transactions during work at major airlines, legacy telecommunications company mainframe callbacks, and a myriad of other such custom back-end systems and business logic.

Data from the application can be recorded to CSV flat files, the most popular databases, or integrated directly into many load-generation tools. Each customer chooses the means of data recording and analysis that best suits their needs. Data written to flat files is automatically archived at configurable file size limits, making for easy scripted automation of both reporting and cleanup. Some of the most common databases also have example data archiving scripts available.

The remainder of this article focuses on a number of real-world instances in which Introscope was used.

"The Big Sleep"
It was a Monday in Philadelphia, overcast and cold. I was working the day shift. The customer was an insurance company with an application in staging.

The application we were monitoring, we'll call it AUDIT, was a Web front end to a legacy green-screen application. Underwriters for the customer use the application to create new policy quotes. AUDIT uses CICS primarily for its back-end data, issuing incoming transactions against the same legacy stored procedures it has for the last 30 years, then parsing them up into JSPs. Pages were designed to be loaded in 1-2 seconds, but requests were taking 7-8 seconds each click. Data from CICS indicated that all requests were being honored quickly. We needed to get to the bottom of the situation fast.

Wily Introscope Custom Tracers implemented on the application's data object parsing procedures showed response times of exactly 100 milliseconds for each call, with 50-60 calls being made per transaction. Quick investigation into the data object construction revealed a developer's placeholder logic. Each object required a unique ID. A 100-millisecond sleep was programmed into the constructor in order to ensure a unique timestamp from each subsequent call to the system clock.

Epilogue: The developer who controlled the knob for remotely adjusting the sleep time was never found.

"The Adventure of the Speckled Bean"
It was a Tuesday afternoon in Texas. I was at a customer who had already logged several months trying to solve their application performance problem. When I asked Dr. Watson's opinion, he replied with a core dump.

In production, the STORE application was losing about 30% of customer purchases due to slow response times. Some requests inexplicably took longer than two minutes, then timed out. Introscope quickly isolated the performance bottleneck to a method that was being used to calculate sales tax for each item of the purchase. A single line of Introscope configuration was enough to trace the business logic interface implemented by all STORE's business logic.

Further investigation revealed that the method used Runtime.exec to invoke a new JVM. Out-of-process, this new JVM calculated a single item's sales tax, printing its results to system out. The application server patiently waited for the printout, then did the same thing again for each item purchased. Under modest load, as many as 50-60 JVMs were being started up and shut down simultaneously, requiring 20-40 seconds of wait time for each. The transactions being lost were those with the most purchased items.

Why? The person tasked with using the EJB interface included with the third-party sales tax calculation software had been unable to load it into the server's context. Frustrated, he fell back on using the software's example code. This was easily reworked into a script that took appropriate command-line parameters and generated the desired result on system out.

Epilogue: The suspect pleaded Perl and was dismissed. Case closed.

"And Then There Were None (JDBC Cursors)"
It's Wednesday and I am steps away from the historic Boston Common. The customer was consistently running out of JDBC cursors and MQ Series connections during the course of their lengthy load tests. Wily's Introscope monitored the allocate and de-allocate semantics of these resources. With Introscope's Blame feature, the team was able to quickly isolate the guilty EJB: under heavy load the application was throwing exceptions that skipped the usual close calls, which should have been enclosed in finally blocks to ensure release.

Epilogue: The missing "close" is now safely behind finally block bars.

"Dial S for Synchronized"
Thursday, and my dogs are barking. I drink my fifth cup of joe and head out the door.

Wily's Introscope measured the average responsiveness of transactions with a proprietary back-end system as 10 seconds in length. In a load test of 10 concurrent users, however, the average response times of transactions that used this back-end system were in the 90-100 second range. This case was getting more and more interesting. A concurrency metric on the call to the back-end system quickly isolated the discrepancy: nine concurrent user threads were sitting on a call to the back-end system while one thread actually transacted work.

Problems such as a misplaced synchronized keyword in the class signature instead of the method signature, a resource pool with a single instance where 10 should have been available, or a remotely accessed server that becomes unavailable in fits and bursts can and have been caught with these Wily concurrency metrics (see Figure 2).

In this case, the application was simply incapable of dealing with unexpected failures of key back-end systems, taking minutes or even hours to time out a call that customers were expecting to come back in seconds. Concurrency is a quick and easy way to identify such spots in the application, making it simple to handle similar failures in production more gracefully.

Epilogue: The application and its owners are now doing hard time in a production facility.

"The Maltese ResultSet"
It's Friday and I'm in Atlanta. Peachtree was everywhere: the street, not so much the tree.

This customer had a problem with large database result sets. In neglecting to architect a strategy by which search queries could be limited and doled out in reasonable increments, they created a "pig in the python" memory problem for their application server. The wrong kind of search or lookup resulted in a JVM gone wild with thrash on the GC Heap. The application server struggled to page-in the result set as it was handed off by the database. Utter destruction of responsiveness for all other transactions with the application was the ugliest side effect.

Wily's Introscope SQL Agent immediately diagnosed the problem by showing the difference between the database queries' response time and "roundtrip" response time. The latter metric included any clock time spent before calling close on the ResultSet, while the former included only the time taken to recover an answer from the database. Roundtrip response times showed extremely large discrepancies from their reciprocal metric. This metric was, of course, recoverable only from inside the application server.

Epilogue: The development team made the necessary corrections and the application is now a fully reformed and contributing member of society.

"Murder on the JDBC Express"
I volunteered to work a Saturday up in San Francisco. After that last customer visit to Vegas, I needed the overtime.

Little did I know that my JDBC woes were far from over. The customer had generally figured out how to tune the response time of their key database interactions - JDBC statements were measured with a rough mean of 10 milliseconds, and most were in the 1 millisecond range.

What about the transaction that fell out of that range? I slapped Introscope Transaction Tracer on the application and recorded a host of 30-second transactions during the standard load test. Previously, no amount of profiling had helped the customer to find the "guilty" method. The Transaction Trace call graphs, automatically weeded of all extraneous data by Introscope, allowed the customer to see the forest for all of its trees: nearly 4,000 JDBC statements were being issued by a single transaction. Even with these fast responses from the database, so many queries are enough to sink a click.

Analysis of the Transaction Trace reveals a single validation method responsible for six JDBC statements for each call - it's called enough to account for almost 40% of the JDBC statements in each transaction. With a trivial number of changes from the development team - less than a day's work - these validation checks were implemented with a caching strategy. CPU burn and transaction time plunged; throughput leapt.

Epilogue: The database made a full recovery but the development team has since been sentenced to Swing.

"The Vector Who Knew Too Much"
It was Saturday night, the end of a long week. The city lights filter through the fog rolling off the bay. The phone rings just as I'm tilting a tall glass of rye.

The customer had a J2EE-based trading infrastructure with calls made directly into their EJB remote interfaces. Months ago, they swapped their JMS implementation and were now experiencing intense CPU burn and reduction in throughput. The "GC Heap Bytes in Use" were rocketing with each subsequent transaction, resulting in an out-of-memory exception. The team rounded up all the usual profiling tools but none of them could identify the source of the leak (see Figure 3.)

Wily's Introscope LeakHunter installed on the applications in minutes and immediately flagged anomalous growth in a single Vector - one of the 45,000 data structures used by the application. The Vector in question contained transaction identifiers, meant to be cached only temporarily for quicker rollback. Instead, the Vector grew one-to-one with the number of transactions made against the application. The new JMS implementation answered questions about its transactions in a slightly different way, leading to a different, unexpected result when "contain" was called on the Vector. The unexpected false answers when "contain" was called resulted in new items being added with every transaction.

Epilogue: The offending Vector now goes by the name of Victor and is living in Florida under the Witness Protection Program.

After a long goodbye, I headed off into the night, not knowing where my next case would take me.

More Stories By Dave Martin

Dave Martin is a System Engineer for Wily Technology. He has worked extensively with dozens of enterprise customers to identify and correct Java application performance issues. A former software developer for Wily technology, Dave has a comprehensive knowledge of J2EE architecture and software systems design and implementation.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

@ThingsExpo Stories
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...
Everything run by electricity will eventually be connected to the Internet. Get ahead of the Internet of Things revolution. In his session at @ThingsExpo, Akvelon expert and IoT industry leader Sergey Grebnov provided an educational dive into the world of managing your home, workplace and all the devices they contain with the power of machine-based AI and intelligent Bot services for a completely streamlined experience.