Web hosting top - 226 CHAPTER 9 PERFORMANCE AND SCALABILITY TESTING

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.

Leave a Reply