Archive for July, 2007

Shared web hosting - 230 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING

Tuesday, July 31st, 2007

230 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING The environment s resources start to become saturated at 600 users, and by 650 users the request throughput degrades substantially. User requests begin backing up in thread pools and finally at the socket level, and by 700 users, the application has entered the buckle zone. Once the application is in the buckle zone, the only option is to stop accepting requests and allow the application to process all pending requests. But in reality, at this point, the only feasible answer is to begin restarting application servers to manually flush out user requests. The user response time, resource utilizations, and the request throughput between the expected usage point and the buckle zone can be used to construct a degradation model. The degradation model explicitly identifies the support buffer and response time patterns. The purpose of constructing a degradation model is to allow your CIO to determine when to acquire additional hardware and software resources. For example, if usage patterns are increasing month-over-month in an identified trend, and a degradation model identifies that within 12 weeks end-user SLAs will be violated, then a strong case is presented for acquiring additional resources. Measurements Before configuring your graduated load tester and firing load at your environment, you need to put the tools in place to gather the appropriate measurements to assess the various states of your environment. In the previous section, we identified three categories of metrics: Resource utilization Throughput Response time The executive summary of your capacity assessment may state simply that at 600 users resources became saturated, but the detailed resource analysis is going to report far more than a simple saturation point metric. We look at a variety of resources in a capacity assessment and identifying the limiting resources is important. For example, if the application is CPU-bound, meaning that the core resource that becomes saturated and brings down the application is the CPU, then adding additional RAM may not be very helpful. You need to configure each relevant resource with monitoring tools and record its behavior during the capacity assessment. Throughput, the second category of metrics, is defined simply as work performed over a period of time. In a transactional application, requests committed per second is a common measure of throughput, and in some environments, I have used the load tester s recording of successful requests processed per second as a measure of throughput. Your choice of measure ment is not as important as the fact that throughput is recorded consistently. Finally, response time can be measured in terms of single requests, business transactions that are a composite of requests, or a combination of the two. The most effective measure of response time that I have observed has been a high-level recording of business transactions with the ability to drill deeper into the individual requests that comprise the business transaction. But in the end, you are measuring your response times against your use case SLAs, so be sure that your measurements are consistent. Resource Utilization The most common resource measured is CPU utilization, because it always increases in direct proportion to the user load: more requests made against the system require more CPU resources to process them. But you need to capture other important metrics, namely the following:
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Graphic web design - CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING These

Tuesday, July 31st, 2007

CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING These manifestations result in a decline in request throughput, which means that requests are left pending and response time increases. If the load continues to increase when the system is in this state, then the response time performance degrades exponentially. The point at which performance time degrades is referred to as the saturation point, or, more colorfully, the buckle zone. Capacity Assessment Usage Mappings The capacity assessment attempts to map the behavior of your environment to the graph shown in Figure 9-2. Therefore, at the end of the capacity assessment, you should be able to construct a graph similar to Figure 9-3. Figure 9-3. In this test, we successfully satisfied our expected users, and we have a buffer before we start exceeding SLAs. Figure 9-3 illustrates that the application is successfully satisfying its 500 expected users, but at 550 users the application starts exceeding its SLAs, showing that we have a 10 percent user buffer that can be supported. The buffer percentage represents your comfort zone for your application if your load never moves outside of your buffer, even during peaks, then you can sleep well at night. You should strive to maintain approximately a 25 percent buffer to allow for marketing promotions or any other significant increase in traffic. A buffer greater than 40 percent is typically too large, because it means that you are maintaining additional hardware and software licenses that really are not needed. Note Although a 25 40 percent buffer is generally ideal, you need to analyze your usage patterns to determine what is best for your environment. If your usage patterns are very volatile, then you might want a larger buffer, but if you are running an intranet application with a fixed maximum load, a smaller buffer may be sufficient.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

228 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING (Web hosting isp)

Monday, July 30th, 2007

228 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING Figure 9-1. A graduated load test Figure 9-2. A loaded enterprise application follows this typical pattern. As the number of users (load) increases, the system utilization naturally increases, because you need more resources to do more work. Likewise the throughput increases, because as you are sending more work to the application, it is performing more work. When the load becomes too heavy for the environment to support, then resources become saturated, which manifests in excessive CPU context switching, garbage collections, disk I/O, network activity, and so on.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING reduce (Web design software)

Monday, July 30th, 2007

CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING reduce that if possible.) Shaving a few milliseconds off of a frequently executed method can yield dramatic improvements in application performance. All performance issues not related to your code need to be investigated on their own; for example, database issues need to be evaluated in a database diagnostic tool. Your Java EE information should provide you with problematic contexts such as SQL statements and the call path that generated the undesirable behavior. The goal is to resolve as many performance bottlenecks as possible prior to performing a capacity assessment. While a capacity assessment can help you tune your environment, tuning is only the secondary goal the primary goal is to determine the maximum load you can support while meeting your SLAs and establish a degradation model for your application once SLAs are violated. Capacity Assessment The purpose of a capacity assessment is to identify the following key data points: The response time of your requests at expected usage The usage when the first request exceeds its SLA The usage when the application reaches its saturation point The degradation model from the first missed SLA to the application s saturation point A capacity assessment should be performed against your production staging environment, but only after you have verified that your application can sustain expected usage through a performance load test. The capacity assessment is the last test performed at the end of an iteration or prior to moving the application to production. Your production staging environment should mirror your production environment, if possible, or be a scaled-down version of it; otherwise, the results of the capacity assessment are of little value. Graduated Load Tester The key tool that empowers you to perform a capacity assessment is a graduated load tester. A graduated load tester is configured to climb to your expected usage in a regular and predefined pattern and then increase load in graduated steps. The purpose behind this configuration is to allow you to capture and analyze performance metrics at discrete units of load. The behavior of graduated load generation is illustrated in Figure 9-1. Graduated step sizes need to be thoughtfully chosen: the finer their granularity, the better your assessment will be, but the longer the test will take to run. You can usually find a good compromise between the test run time, the analysis time, and the granularity of the steps; it varies from application to application, but as a general rule, I configure these steps to be about 5 percent of the expected load. For example, if you need to support 500 simultaneous users, then your graduated step might start at 25 users. Graduated steps are required because of the nature of enterprise applications, as Figure 9-2 illustrates.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Web hosting top - 226 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING

Sunday, July 29th, 2007

226 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING Chapter 5 details how to use each of these performance profiling tools and how to interpret the results. If you jumped right to this chapter, I suggest you review the material in Chapter 5 before investigating performance problems. Thus far we have been looking at the bottom-up approach to performance tuning from an application s inception. This approach is great in theory, and you can definitely apply it in the next project, but what do you do today? Luckily, we can apply similar principles with a top-down approach. I hope that you have a production staging environment that you can test against, but if not, you can capture performance data from a running production environment. Note Configuring a diagnostic tool to run in a production environment can be a tricky task, but depending on the tool itself, its impact on the environment can be mitigated. The core factors that can help you mitigate the impact of such a tool in production are configuring filters, increasing aggregate sampling intervals, and bundling components. Filters allow you to capture only the requests you are interested in (in some cases, you may need to record several iterations of data with different filters to capture all interesting data). Call traces are aggregated at a specific interval, and increasing this interval reduces the workload on the data correlator (for example, aggregate data every 1 or 2 minutes, rather than every 10 or 30 seconds). To isolate poorly performing components, sometimes bundling related code packages together into individual components and returning a single value, rather than reporting method-by-method data, can provide valuable information at lesser overhead. You will need to spend significant time with your performance diagnostic tools and tool vendors to determine the best approach to recording detailed information in a live production environment. The process is to record detailed, method-level performance information against your environment while it is subjected to load. From this data, you want to extract the following information: What are the slowest running requests? What are the most frequently executed requests? From these requests, what are the hot paths through the requests? What are the hot points in those hot paths? Are the performance problems code issues, configuration issues, or external dependency issues? Examine each slow request and determine why it is slow: is it a slow method, a slow database call, or an environment threading or memory issue? If you can identify the problem as being code related, then examine the offending methods. If the performance issues still evade you, then examine the offending methods inside a code profiler by replaying the problematic requests against your profiled environment and examining the offending methods line by line. Continue this process until all major code bottlenecks have been resolved. To fine-tune your application, identify requests and/or methods that are executed frequently. Try to find methods that you have a chance of tuning; for example, your application may call StringBuffer.append() millions of times, but you cannot improve its performance. (Actually, in this case, you want to find out why the method is being called so many times and substantially
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

CHAPTER 9 PERFORMANCE AND (How to cite a web site) SCALABILITY TESTING If

Sunday, July 29th, 2007

CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING If you recall from Chapter 5, an SLA is defined by the following three key criteria: It is specific. It is flexible. It is reasonable. The specific value measures the performance of a single request: the request must respond within three seconds. The flexibility value, however, measures the scalability of the request: the request must respond within three seconds for 95 percent of requests and may fluctuate, at most, one standard deviation from the mean. The strategy is to first ensure the performance of a request or of a component and then test the request or component for scalability. Ensuring the performance of a request or of a component depends on where your application is in the development life cycle. Optimally, you want to implement proactive performance testing in the development phase of your application, which includes developing unit tests using a unit testing framework, like JUnit, and implementing code profiling, memory profiling, and coverage profiling against those unit tests. From code profiling, you want to watch for the following three key things: Poorly performing methods Methods invoked a significant number of times Classes and methods that allocate an excessive number of objects The purpose of code profiling is to identify any egregiously slow algorithms or methods that are creating a surplus of objects; for example, trying to sort 1 million items using a bubble sort algorithm can result in up to 1012 object comparisons, which could take minutes or hours to execute. When implementing memory profiling, you look for the following two things: Loitering objects Object cycling Loitering objects, also referred to as lingering object references, are unwanted objects that stay in the heap after the end of a use case. They reduce the amount of available heap memory and typically are tied to one or more requests, so they are leading the heap down a path to its ultimate demise. Another side of memory mismanagement is object cycling, or the rapid creation and destruction of objects in the heap. While these objects do not linger in the heap and consume permanent resources, they force the garbage collector to run more frequently and hence hinder performance. Finally, coverage profiling establishes the level of confidence you have in your unit tests. The coverage profiler tells you each condition that was and was not executed for every line of code. If you test the functionality and performance of your code in unit tests, and your coverage is high, then you can feel comfortable that your code is solid. On the other hand, if your coverage is low, then you can have very little confidence in your test results.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

224 CHAPTER 9 PERFORMANCE AND (Yahoo web space) SCALABILITY TESTING

Saturday, July 28th, 2007

224 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING Here s a coarse comparison: back in 1997, I bought a 1995 Mazda RX7 (the Batmobilelooking car). It is a high-performance sports car boasting acceleration from 0 to 60 mph in less than five seconds and a top speed of over 160 mph. It corners fast and handles incredibly, but it has a limitation referred to as unpredictable oversteer it can take corners very fast, but once you pass a certain threshold, the car s behavior is unpredictable. Shortly after buying the car, I took my friend Chris for a ride, and we discovered that threshold. I approached a tight corner, and instead of letting off the gas, I accelerated. The car performed two 360-degree spins before coming to a (thankfully) safe stop. Needless to say, Chris and I needed to take another short trip around the neighborhood to restart our hearts, but I never pushed the car past the limit that I discovered. Let s bring this back to performance and scalability testing: you may be comfortable with the performance of your application in general and even with its performance at your current or projected usage, but until you discover its breaking point, you will always experience uncertainty every time marketing runs another promotion or a new, high-profile customer endorses your application. The key to attaining this confidence is to perform the following tasks: Assess the performance of your application at expected load. Determine the load that causes your application to exceed its SLAs. Determine the load that causes your application to reach its saturation point and enter the buckle zone. Construct a performance degradation model from expected usage to exceeded SLAs to saturation point. With this information in hand, you will be well equipped to project the effects of changes in usage patterns on your environment and intelligently recommend environment changes to your CIO. Performance vs. Scalability The terms performance and scalability are commonly used interchangeably, but the two are distinct: performance measures the speed with which a single request can be executed, while scalability measures the ability of a request to maintain its performance under increasing load. For example, the performance of a request may be reported as generating a valid response within three seconds, but the scalability of the request measures the request s ability to maintain that three-second response time as the user load increases. Scalability asks the following questions about the request: At the expected usage, does the request still respond within three seconds? For what percentage of requests does it respond in less than three seconds? What is the response time distribution for requests that do not respond within three seconds?
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Web server info - CHAPTER 9 Performance and Scalability

Saturday, July 28th, 2007

CHAPTER 9 Performance and Scalability Testing I sent my architect on a tuning mission following the wait-based tuning approach that you showed us. We decided to scale both vertically and horizontally inside a cluster, carefully choosing our replication strategy. So now how do I set my expectations for the environment? John took a step that I was hoping that he would. He recognized that, while tuning efforts and deployment planning exercises improve the performance of your applications, they do nothing to instill you with confidence until after you have run performance and scalability tests and can support the effectiveness of your efforts with hard numbers. That is a very good question. Remember when we talked about the behavior of an application when it is exposed to an increasing user load? Do you mean the response time, utilization, and throughput graph? John asked. Exactly, I replied. As user load increases, the system is required to do more, so resource utilizations increase; the application performs more work, so throughput increases; and thread contexts switch, so response time is marginally affected. But there is a point where resources saturate, causing the system overhead to hinder application performance, reduce throughput, and finally increase the response time exponentially. Whenever I describe this graph (see Figure 9-2) without any props, my arms move in upward curves and crosses, which are meaningless to anyone who has not seen the graph before. Luckily John knew exactly what I was talking about and tolerated my flapping arms. Yes, that graph scares me, because when things start going bad, they go bad very quickly! Yes, so the key to attaining confidence in your tuning efforts and deployment planning exercises is to run performance and scalability tests. And the final goal in running these tests is overlaying your performance metrics on top of such a graph. In the end, you can state with confidence the number of users your application can support while meeting SLAs and how it behaves afterward. Let me show you the strategies I employ to perform these tests. Performance and scalability testing are crucial to the successful deployment of your applications. You can design solid applications, test each component individually, test the integrated solution, and even test your applications in a production staging environment, but until you discover the limits of your environment, you will never attain sufficient confidence that your application can meet the changing needs and expectations of your users.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

222 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Summary A (Web site directory)

Saturday, July 28th, 2007

222 CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS Summary A high-performance deployment strategy depends on expected user load, availability requirements, and failover requirements. The expected load defines the number of simultaneous users you need to support and thus directly impacts the number of servers in your environment. Availability requirements dictate how much time your application needs to be available. Failover requirements define the impact of application server outages on your users. Equipped with this information, you can scale your application vertically and horizontally to satisfy the expected user load and meet availability SLAs while implementing clusters to satisfy failover requirements. A well-planned deployment strategy can save you countless hours and help you avoid sleepless nights. It can give you confidence that your application can handle whatever curveballs your users send its way. In the next chapter, we ll look at the process of performing a capacity assessment against a production staging environment that adheres to our deployment strategy.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS servers by another

Friday, July 27th, 2007

CHAPTER 8 HIGH-PERFORMANCE DEPLOYMENTS servers by another firewall, but not always. When making this decision, you need to consider how secure your business tier needs to be: if someone hacks into your Web server, do you need to stop the intruder there, or are security measures at the Web server sufficient? Inserting a fire- wall between your Web and application servers is a good idea for security, but it adds additional overhead to your requests as well as additional responsibilities to your workload to manage and maintain it. If you are working with users personal and/or financial information, then I would consider a firewall placed between the Web and business tiers essential. But if you are only displaying the contents of an online catalog or maintaining a message forum, then the urgency to do so is reduced. As previously mentioned, application servers can be broken down into a dynamic Web tier and a business tier, each equipped with its own set of hardware and software servers. In the case of a cluster, each tier should access a consistent primary business server and fail over appropriately. This will help mitigate the load. Finally, as requests are made against the database, these requests need to be properly load balanced. Fortunately, in large environments, this is handled for you by your database clustering software. And for small environments, database clustering is too expensive to be feasible, so load balancing is accomplished by refactoring your data model to allow data to be maintained in distinct database instances. Load Testing Strategy Before closing this chapter, we ll revisit the different performance testing phases. In development, we implement performance unit tests; in integration and QA, we implement a performance integration test and a performance integration load test; and in the production staging environment, we implement a production staging performance test and a production staging performance load test. Remember when implementing production staging tests that your deployment strategy must be represented in your production staging environment. It is not sufficient to load test your application running in a shared environment with other applications competing for resources without implementing the same tier breakdown in your deployment strategy. Requests spend time traveling between tiers and passing through firewalls, so for the highest degree of confidence, be sure to create a production staging environment that resembles your production environment. Ideally, you would maintain a production staging environment that either mirrors production or is a stripped-down version of production. For example, if you have six application server instances in your business tier in production, two might suffice in production staging. But testing your entire application server on the same machine or missing any of its tiers reduces confidence as applications are rolled out to production. As a general rule, when scaling down a production environment to create a staging environment, scale down the environment proportionally. For example, if you have four Web servers and eight application servers, then production might have two Web servers and four application servers. If you drop down to two Web servers and two application servers, you will find it difficult to extrapolate the behavior of the Web servers when forced to spread the load between two servers (each) instead of one.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.