Refer to blog:Http://blogs.msdn.com/ B /domain_connect4
Throughput
What is throughput?
Streaminsight throughput has two different aspects: Input throughput and output throughput. The former indicates the speed at which an event enters the streaminsight engine from the input Adapter. The latter indicates the time at which the output event of the query result is received by the output adapter.
How to Monitor throughput?
A simple method is to use Server Explorer in Visual Studio. The procedure is as follows:
1. navigate to servers> <machine Name>-> performance counters (Note: The Chinese operating system installed on the machine, but Visual Studio is installed in the English version, therefore, it will be a bit "mixed" in the future ")
2. Right-click performance counters to create a custom category,
3. Next we will add two counters: inputeventrate and outputeventrate. The types are rateofcountspersecond64:
4. After the creation is completed, it is as follows:
5. Add the counter in the input adapter and output adapter belowCode, As follows:
Input adapter:
PerformancecounterInputeventratecounter =NewPerformancecounter("Streaminsightcategory","Inputeventrate",False);If(Enqueue (RefCepevent) =Enqueueoperationresult. Success) {inputeventratecounter. increment ();}
Similarly, in the output adapter:
PerformancecounterOutputeventratecounter =NewPerformancecounter("Streaminsightcategory","Outputeventrate",False);If(Dequeue (OutCepevent) =Enqueueoperationresult. Success) {outputeventratecounter. increment ();}
6. Use the Windows system's self-contained performance tool (perfmon.exe) to view the values of the preceding two counters,
Performance Impact Factors
- The performance of the input adapter depends on the speed at which data is read from data sources (such as SQL databases, log files, and network I/O) and converted to CEP events;
- The speed of the output adapter depends on the output queue of the streaminsight engine. Therefore, its performance is affected by data storage, such as the storage of output data to disks or databases;
- Whether the streaminsight engine is efficient depends on its efficiency in user query of input data;
- In addition, there are many other performance factors, such as the performance of the host hosting streaminsight.