Archive for September, 2007

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT Figure (Web hosting uk)

Saturday, September 8th, 2007

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT Figure 10-4. Graphs showing the average garbage collection rate and the garbage collection overhead for the heap shown in Figure 10-1 The rate of garbage collection is measured in thousandths of occurrences per second, which after conversion to minutes resolves to the top points being four occurrences per minute and the bottom point being one occurrence per minute. Depending on the nature of the application, this may or may not be a problem, but over one-third of the samples showed garbage collections occurring every 15 seconds. This recording was measured against a Sun heap, so we can further break down the data into rates of garbage collection in the new generation and the old generation, as shown in Figure 10-5.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

274 CHAPTER 10 JAVA EE (Web site layout) PERFORMANCE ASSESSMENT

Friday, September 7th, 2007

274 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT Figure 10-2. This heap appears to have a slow memory leak. At first glance the heap in Figure 10-2 appears healthy: it is at its steady state with an average utilization below 40 percent and a range of 150MB. But when you closely examine the minimum values for each sample and plot a line through those values, the resulting line displays a visibly increasing slope. Note the darker line in Figure 10-3, which approximates the closest straight line through the minimum value points. Figure 10-3. The line plots a straight path through the minimum values and reveals that the slope is definitely increasing. As you can see in Figure 10-3, the slope of the minimum values for each heap sample is in fact increasing, which indicates a slow memory leak. The term slow memory leak means that the application is leaking memory either through very small objects or only on specific requests that are less frequently invoked. The next step in identifying the root cause of this memory leak is to determine which requests were being executed at the time of the recording and replay those requests in a memory profiler. While the heap in Figure 10-1 is fairly healthy, a point of concern is that the range of the heap during each one-minute interval is 250MB, or almost 32 percent of the heap s size. If this is a high-traffic site, then a 250MB range is perfectly acceptable, but if the traffic is relatively low, then I would advise the application developers to chase down potentially cycled objects. A large period range is an indirect indication that garbage collection may be running excessively and its impact may be observable. Figure 10-4 displays garbage collection metrics (rate and overhead) for the heap in Figure 10-1.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Photography web hosting - CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT The

Thursday, September 6th, 2007

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT The utilization of this heap climbs to about 450MB at its peak (on an almost regular basis), which is 56 percent of the total heap size. If this recorded session is representative of typical usage patterns, then the heap size could potentially be reduced it is best to keep the heap utilization at about 70 percent for typical usage patterns, as this provides room for additional usage but is not wasteful. Figure 10-1. A heap that has reached its steady state A heap s growth pattern measures the slope of the heap s minimum values after it reaches a steady state. An increasing slope may indicate a memory leak, whereas a flat or decreasing slope could indicate that the garbage collector is able to reclaim the same or more objects than are created. A flat slope does not necessarily indicate that your application doesn t have a memory leak, but it does indicate a decreased probability of a memory leak. In a 30-minute session, the growth pattern may or may not be conclusive, but if you analyze the same metric over a few days or a week, then you can extract some strong conclusions about the likelihood of a memory leak. The slope of Figure 10-1 is flat, which is interpreted in a performance analysis report as indicating a low probability of a memory leak, but a longer test is required for a conclusive answer. In contrast to the behavior demonstrated in Figure 10-1, Figure 10-2 shows a slowly increasing heap.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

272 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT (Free web host)

Wednesday, September 5th, 2007

272 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT analysis perspective, I want to focus on three primary performance metric categories in the sections that follow: Heap performance CPU utilization Process memory utilization You can review many metrics with respect to the environment, but these three metrics have the biggest impact on your tuning efforts I always check the previously listed metrics when constructing a performance analysis report. Heap Performance Java EE applications run inside a JVM process, which provides a memory heap in which all object instances exist. Every object that your application creates is first loaded into process memory, an instance of it is created in the heap, and a reference to it is returned to your application. Your application interacts with that object, and when the object is no longer required, your application deletes the reference to it, making the object eligible for garbage collection. The JVM maintains a garbage collector thread that, depending on your JVM vendor and configuration, periodically cleans up memory occupied by unreferenced objects. Because of this tight interaction between your application, application server, and JVM, the behavior of the JVM can greatly affect the performance of your application. You have three primary considerations when analyzing the performance of a heap: Heap utilization Heap growth pattern Garbage collection behavior Regardless of the JVM vendor, your application will need a certain amount of memory to hold all of its objects. The typical behavior is that the heap climbs steadily until it reaches a steady state. Temporary objects are created and destroyed, but in general the heap remains relatively flat. Figure 10-1 shows a heap that has already reached its steady state. You can read Figure 10-1 as follows: The heap size is represented by the flat line at the top of the figure and is 800MB. The average heap usage is the solid line inside the shaded region. It ranges between 250MB and 350MB. The shaded region represents the range of the heap during a sample interval. The minimum heap averaged approximately 150MB and the maximum heap averaged approximately 400MB.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT filtered (Make my own web site)

Tuesday, September 4th, 2007

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT filtered subset of requests, diagnosing performance problems is the primary goal, so the sampling period should be finer. Depending on the resource utilizations of your production environment, you can entertain values ranging from 30-second samples to 2-minute samples. Typically I use 1-minute samples in production, just to be safe. In the staged approach that you implement when recording in production, the component recording implements minimal filtering (you might filter a specific application, but in general you want to see as many requests as possible), but the detailed recordings make extensive use of filters. A detailed recording may filter out (exclude) all requests except for four or five specifically named requests. By definition, the component-level recording uses the component level of detail, while the detailed recording uses a detailed, or method, level of recording. Finally, create custom components for all third-party libraries that your application uses. You might want more detailed information about a third-party library when recording in a preproduction environment, but in a production environment you want to obtain as much valuable information as possible, but with minimal performance monitoring overhead. Your performance analysis report can include callouts to the contributions of third-party libraries to request response times, but identifying the root cause of third-party performance problems in a production environment offers no real benefits. Metric Analysis At this point, you should have obtained performance metrics about both your platform and your application, from either a preproduction staging environment or a live production environment. Regardless of where you obtained the information, the real challenge is in analyzing the data and assigning meaningful business values to it. In this section, we ll break down the analysis of performance metrics into the following categories and discuss how to interpret those metrics: Environment: This section reviews the environment upon which the application server runs, including the operating system and JVM. Application server: Here you ll review the performance of application server specific metrics and how your application interacts with them. Application: In this section, you ll examine the performance of your application, focusing on identifying the hot path through a slow request as well as the hot point within the hot path. Also, you ll learn about the principles of wait-based tuning to reveal implicit configuration issues that manifest through application behaviors. SQL report: Because most enterprise applications interact with a database, it is important to identify poorly performing SQL code, as it impacts the application. In this section, you ll also look at properly tuning prepared statement caches. Environment For the purposes of this discussion, the environment is the platform that hosts the application server, including the underlying hardware, operating system, and JVM. Specifically from an
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

270 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT (Web host server)

Monday, September 3rd, 2007

270 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT custom components that do not report the inner workings of specified classes or packages. In this scenario, performance overhead is reduced and the instrumentation reports less information by excluding information that you are not interested in. As an example, consider Apache Struts. When you build a Struts application, you implement your business functionality inside action classes, and Struts handles the application and navigation logic. If you were to create a custom component that wraps the package org.apache.struts, then the instrumentation would report something like the following: 1. The Web server received a request for GET /myapp/myaction.do. 2. The Web server forwarded the request to Struts. 3. Struts forwarded the request to your servlet s service() method. 4. service() called X.method(), and so on. The point is that the internal workings of the Struts servlet would be hidden from your recorded data. It s sufficient to say that after the Web server forwarded the request to the Struts front controller servlet, the servlet did a bunch of stuff and then eventually invoked your action. The recording still reports the amount of time the request spent inside of Struts, but excludes the inner workings between the initial invocation and the call to your action class. Metric Recording When you record metrics in a production environment, monitoring overhead dictates the level of detail you can obtain. Consider the following when configuring bytecode instrumentation recordings parameters that limit overhead: Number of samples Sampling period/aggregate period Filters Level of detail Custom components When recording in a production environment using a staged approach, the initial component- level recording should be configured to record enough samples as to not overload the servers it is monitoring. This may mean that a large number of samples are skipped, but primarily what you are interested in during the first component phase is a list of candidates for which you will capture detailed information in subsequent recordings. In the subsequent detailed recordings, you have filtered out the majority of requests and are only looking at a handful of requests. Therefore, the monitoring tool should be configured to capture as many samples as possible. The sampling period, or timeframe that we aggregate request summaries, is always problematic in production environments because of the added load it subjects the application server to. In the first component-level recording phase, diagnostics will be localized to identifying candidates for additional information, so the sampling period can be configured very coarsely, such as every five minutes. In subsequent phases, when you perform detailed recordings on a
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

CHAPTER 10 (Web hosting rating) JAVA EE PERFORMANCE ASSESSMENT hot

Sunday, September 2nd, 2007

CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT hot dog stand, asking people who just bought lunch there if they like hot dogs) and interview enough people to generate statistically relevant data. Similarly, your load balancer helps ensure that each server is a representative subset of the application behavior, and depending on the size of your environment, one or two servers may suffice to be statistically relevant. Furthermore, every server that you are monitoring sends data to your monitoring solution, so the amount of load that the monitoring solution must organize can quickly become overwhelming. Basic metrics are one thing, but detailed bytecode instrumentation can be expensive to manage. When 20 application servers each send hundreds of call stack 40 or 50 methods deep to the monitoring solution, the monitoring solution s hardware and databases can grow overwhelmed and fall behind recording the information. Keep monitoring as simple as possible. The final point is moot once the environment is configured, but realistic in practice: the more servers you configure, the higher the chances of human error. Furthermore, if a single error removes one server from your test, does that mean that your test becomes invalid? It is much easier to choose a representative subset. Staged Recording What do you do if you employ every mechanism to reduce the impact of monitoring overhead and it is still too high? The solution I have implemented in dozens of environments is to stage the recording into two primary phases: 1. Cursory recording 2. Detailed recordings The cursory recording is a lightweight recording that records at a minimum request information such as request name, response times, and call counts, and at most records component- level information, breaking a request down into its major components such as Web server called servlet X that called EJB Y that executed the JDBC query Z. The purpose of this cursory recording is to learn what parts of your application you want additional information about. Specifically, you want to answer the following questions: What service requests are exceeding their SLAs? What service requests are particularly slow (even if not exceeding their SLAs)? What service requests are contributing the most time to the application? (These make good proactive tuning targets.) Which components are being routinely accessed that are either performing well or that you have no ability to tune? Take the information that you derive from the cursory recording and configure one or more detailed recordings. The detailed recordings should be configured to filter out all requests except for the identified requests; in busy environments, I try to limit each detailed recording to five requests. The detailed recordings capture full call stacks through bytecode instrumentation to direct you to the root cause of their performance hot points. This collection of detailed recordings will be analyzed in the performance analysis report. If your monitoring tool has the ability to capture component or boundary data in the cursory recording, then in addition to configuring filters to isolate identified requests, you can create
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Frontpage web hosting - 268 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT

Saturday, September 1st, 2007

268 CHAPTER 10 JAVA EE PERFORMANCE ASSESSMENT Environmental Subsets Depending on your application and resource utilization levels, monitoring overhead can dramatically impact production application performance. And if the impact is observable to your users, then it is too much! In addition, consider the size of your enterprise environment: how many servers do you have in your application server tier? Do you have a load balancer configured to distribute the load evenly? Note While observable monitoring overhead is typically classified as too much overhead, if the system is under severe stress, then the additional overhead is acceptable if it provides information that can lead to the resolution of the performance problem. If a server is going to crash in 15 minutes and you make it crash in 5 minutes instead, but you capture detailed information about why it crashed, then crashing it sooner is worth it! A technique I often use to reduce monitoring overhead, given the fact that the size of the environment is large and the load balancer should be equally distributing the user load, is to record detailed data from a subset of the environment. For example, the telecommunications company I mentioned at the beginning of the chapter that wanted to capture the top five performance bottlenecks configured the detailed monitoring to record from a single server in their 32-server environment. Their environment was configured with 32 identical machines (spread across two data centers), with load balancers evenly distributing the load, so any individual server should be representative of the actual end-user activity. Recording from an environment subset serves several purposes: Reduces the impact of monitoring overhead Provides representative data, but reduces the quantity of data to sift through Results in less error-prone configurations The first point addresses the perceived impact of monitoring overhead. I will provide detailed information later in this chapter about how to reduce the actual overhead, but this point relies on the fact that only a subset of users will be affected by the test. The second point may not be instantly obvious, but given identical hardware and software configurations, and considering that a single server is representative of what is happening on each server, why do you need additional data? If application code bottlenecks are occurring at a single point, then it does not matter if you see one occurrence of the problem or one hundred occurrences you have found the problem. You still need to monitor the environment with production load to identify problems that may be load dependent, but less data that is still representative is quicker to navigate. The best analogy I can use to convey the concept relates to statistical surveys. When you read the results of a survey stating that 35 percent of the population believes XYZ, do you know how the survey company arrived at this value? Did the survey company interview the entire population? No it interviewed enough people to generate a representative subset of the population and extrapolated the results to the rest of society. The survey challenges are to identify a representative subset of society (for example, it s not a good idea to conduct an interview in front of a
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.