Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
Enterprise Library Test Guide - Willy .Net
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
218<br />
<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />
Also, a NIC’s autonegotiation feature may not properly set the duplex value. You<br />
may have to disable the feature and manually set the NIC to full duplex.<br />
Another problem that can increase network traffic is to host multiple Web controls<br />
on the Web test page. Remove some of the controls to decrease the Web page’s use of<br />
network resources.<br />
Monitoring the Load Agents<br />
A common problem during performance tests is that the load agents use all of the<br />
system resources. Typically, the CPU is the problem. This may be because the transaction<br />
response times are very short. Another reason may be that it is expensive to<br />
create the domain objects that the application block uses. To correct this problem,<br />
increase the number of load agents. An agent should use no more than 75 percent to<br />
80 percent of the CPU.<br />
Monitoring for Locking and Contention<br />
Locking and contention in an application are major performance issues because they<br />
affect the application’s scalability. Use a tool. such as the profiler that is in Visual<br />
Studio Team System. to pinpoint problems that are caused by locked data structures.<br />
To identify contention problems, examine the .NET CLR LocksAndThreads\Contention<br />
Rate/sec performance counter. This counter displays the rate at which the<br />
common language runtime (CLR) unsuccessfully attempts to acquire a managed<br />
lock. Sustained higher values may be a cause of concern, particularly if the application<br />
block uses only a small percentage of the CPU.<br />
Measuring Performance<br />
Each <strong>Enterprise</strong> <strong>Library</strong> performance test ran for 5 minutes to 7 minutes. There were<br />
no think times. The warm-up times were 30 seconds. (The warm-up time is used in<br />
a test script to ensure that an application reaches a steady state before the test tool<br />
starts to record results.) Results were recorded every 15 seconds.<br />
Each <strong>Enterprise</strong> <strong>Library</strong> stress test ran for 12 hours to 72 hours. There were no think<br />
times. The warm-up time was 5 minutes. Results were recorded every 60 seconds.<br />
Usually, 72 hours with no think times is a good simulation of 2 weeks in a production<br />
environment.<br />
Data collection samples should contain a minimum of 120 samples. Adjust the sampling<br />
interval according to the duration of the test. This is true for both performance<br />
and stress tests. Longer tests should have longer intervals between samples to avoid<br />
too many measurements and filling up the media store.