After specifying specific performance requirements, you can start testing and determine the applicationProgramWhether these requirements are met. Performance testing assumes that the application runs stably and reliably. Therefore, it is important to eliminate as many variables as possible during testing. For example,CodeErrors can cause performance problems, or even mask performance problems. To accurately compare the results of different performance tests, the application must work correctly. If the implementation of components is modified during the adjustment process, it is particularly important to retest the functions of the application. The application must pass the functional test before testing the performance. In addition to application changes, unexpected changes may occur to hardware, network traffic, software configurations, system services, and many other aspects. It is important to control application changes.
Measurement performance
To adjust the performance correctly, you must accurately and completely record the results of each test and maintain them. Records should include:
- Accurate system configuration, especially the differences from previous tests
- Calculation results of raw data and performance monitoring tools
These records not only indicate whether the application meets performance goals, but also help identify potential causes of future performance problems.
During each test, a series of identical performance tests are run; otherwise, the results cannot be distinguished from the changes in the test or application changes. Making as many performance testing operations as possible automatically helps eliminate operator-caused differences.
Other seemingly benign factors affect performance testing results, such as the time when the application was running before the test began. Just as the performance of a cold car engine differs from that of a hot engine, the performance of a long-running application may be different from that of a newly started application due to memory fragmentation.
Define Performance Testing
Measure and record the standard values specified in performance goals during performance testing. It is important to meet all performance metrics (such as thinking time and transaction mixing. Under these constraints, the test should be as practical as possible. For example, test the application to determine its performance when many clients access it at the same time. Multi-threaded testing applications can simulate multiple clients in a replicable manner. Each thread represents one client. If the application accesses the database, the database should contain the actual number of records, and the test should use the random (but valid) value of the data item. If the test database is too small, the cache effect of the database server will produce testing results that do not meet the actual conditions. If the input or access method does not meet the actual conditions, the results may also not meet the actual conditions. For example, it is impossible to create new data in alphabetical order on the primary key.
Generally, the test device must accept user-specified input parameters, such as transaction mixing, thinking time, and number of clients. However, the device itself can define rules for creating actual random data.
After creating a test device that drives the application, you should document the constant conditions for all running tests. At the very least, these conditions should include the input parameters required to run the test device. In addition, you should document how to set up a database to run the test. Note that the specified database should not contain the changes made in the previous test. The computer configuration used for testing should also be specified in the description. Run the test device on another computer that is different from the application, because this setting is closer to the production environment.
Determine benchmark performance
After performance goals are determined and performance tests are established, a test is run to establish a benchmark. The more similar the verification environment is to the production environment, the higher the possibility of satisfactory performance after application deployment. Therefore, it is important to have a verification environment that meets the actual conditions at the beginning.
Fortunately, the benchmark performance will meet the performance goal and the application does not need any adjustments. However, it is more likely that the benchmark performance is unsatisfactory. However, recording the initial test environment and benchmark results can provide a solid foundation for adjustment.
Stress Testing
Stress testing is a specialized form of performance testing, which is similar to destructive testing in other engineering fields. The purpose of stress testing is to make the application fail and increase the processing load to lower the performance until the application starts to suffer from problems due to resource saturation or errors. Stress Testing helps reveal subtle errors that are discovered only when the application is deployed. Because such errors are typically caused by design defects, stress testing should be performed in each area of the application as early as the development phase. Fix these minor errors at their source, rather than ignoring them until they may show symptoms elsewhere in the application.
Solve performance problems
Generally, performance problems can be attributed to more than one factor. As a result, the solution to performance degradation is very similar to that for scientific experiments. Scientific Experiments traditionally follow a six-step process, including observation, preliminary assumptions, prediction, testing, control, and conclusion. Conclusion It is composed of the assumptions supported by the best evidence set accumulated in this process. The same process can be followed to solve performance problems.
When it is observed that the performance of ASP applications is lower than expected, you assume that the attributes of the aspprocessorthreadmax metadatabase are set too low. This situation may occur when the performance counters of ASP queuing requests are moved up and down and the processor running efficiency is lower than 50%. You predict that adding the value of the aspprocessorthreadmax metadatabase attribute can improve performance.
The active thread setting has now become a control. Only one setting change is made at a time until satisfactory performance changes are observed. If the performance is more satisfactory after several adjustments to the attributes of the aspprocessorthreadmax metadatabase, the conclusion is that a property setting is combined with all the current variables (total memory required, number of running applications, upgraded software, etc.) to provide the best server performance. Any changes in the variable form a further experiment.