Performance Modeling

Objectives

  • Engineer for performance up front.
  • Manage performance risks.
  • Map business requirements to performance objectives.
  • Balance performance against other quality-of-service requirements.
  • Identify and analyze key performance scenarios.
  • Identify and allocate budgets.
  • Evaluate your model to ensure you meet your performance objectives.
  • Identify metrics and test cases.

Performance modeling provides several important benefits:

  • Performance becomes part of your design.
  • Modeling helps answer the question "Will your design support your performance objectives?" By building and analyzing models, you can evaluate tradeoffs before you actually build the solution.
  • You know explicitly what design decisions are influenced by performance and the constraints performance puts on future design decisions. Frequently, these decisions are not captured and can lead to maintenance efforts that work against your original goals.
  • You avoid surprises in terms of performance when your application is released into production.
  • You end up with a document of itemized scenarios that help you quickly see what is important. That translates to where to instrument, what to test for, and how to know whether you are on or off track for meeting your performance goals.

Upfront performance modeling is not a replacement for scenario-based load testing or prototyping to validate your design. In fact, you have to prototype and test to determine what things cost and to see if your plan makes sense. Data from your prototypes can help you evaluate early design decisions before implementing a design that will not allow you to meet your performance goals.

To use this performance model, do the following:

  • Set goals. Capture whatever partial performance-related information you have, including your application prototype's metrics, important scenarios, workloads, goals, or budgets. The performance model presented in this chapter is designed to use the partial information you might have in these areas as input. You do not have to completely fill out the data or have a complete understanding of your own requirements and solutions.
  • Measure. Execute the suggested tasks in the process to iteratively set goals and measure the result of your action, by using the partially completed model as a guide of what to focus on. This allows you add and refine the information in your model. The new data will inform the next round of goal setting and measurement.

Why Model Performance?

A performance model provides a path to discover what you do not know. The benefits of performance modeling include the following:

  • Performance becomes a feature of your development process and not an afterthought.
  • You evaluate your tradeoffs earlier in the life cycle based on measurements.
  • Test cases show you whether you are trending toward or away from the performance objectives throughout your application life cycle.

Modeling allows you to evaluate your design before investing time and resources to implement a flawed design. Having the processing steps for your performance scenarios laid out enables you to understand the nature of your application's work. By knowing the nature of this work and the constraints affecting that work, you can make more informed decisions.

Your model can reveal the following about your application:

  • What are the relevant code paths and how do they affect performance?
  • Where do the use of resources or computations affect performance?
  • Which are the most frequently executed code paths? This helps you identify where to spend time tuning.
  • What are the key steps that access resources and lead to contention?
  • Where is your code in relation to resources (local, remote)?
  • What tradeoffs have you made for performance?
  • Which components have relationships to other components or resources?
  • Where are your synchronous and asynchronous calls?
  • What is your I/O-bound work and what is your CPU-bound work?

And the model can reveal the following about your goals:

  • What is the priority and achievability of different performance goals?
  • Where have your performance goals affected design?
Detail please refer to:

https://msdn.microsoft.com/en-us/library/ff647767.aspx



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章