Always heard that Dapper's data processing ability is very strong. I've always liked it. But a recent stress test was unexpected ....
Written at the end. For a long time did not write things, feel I do not know how to express their meaning. The test was also the beginning of their own. I do not know whether the test ideas and methods are correct. You can spit out the groove.
Test code Download
Http://pan.baidu.com/s/1dDAjZnN
2 ways to operate the db.
1 Pure MySQL Operation DB
2 Dapper mode operation DB
Test Method 1
A user runs code n times and tests code execution consumption. In this mode comparison. Dapper's curd operation and pure handwritten SQL efficiency differ substantially. is a comparison of several operations.
You can see that in this case the dapper and handwriting code performance differ little. There are even advantages. However, it can be found that dapper actually consumes more resources in CPU operation and GC recycling.
Of course I don't have a high number of tests here. can also use a higher number of pressure to see. I also tried to run 1w times 10w times efficiency. are not very different.
Test Method 2
Multi-user concurrency with LoadRunner stress testing tools.
Dapper analog 300 user request, random paging
Original Eco MySQL simulator 300 user request, shuffle page
Comparison can be seen
Contrast item (300 concurrency) |
Dapper |
Original Eco MySQL |
Response Time Unit S |
4.3 |
1.4 |
Transaction through Total/s |
Approx. 108 |
310-350 |
|
|
|
|
|
|
|
|
|
2 key parameters in the case of user concurrency, the response of the dapper is greatly reduced. In cases where 500 concurrency is reached. This value will also be decremented to 11s. And the number of things passed down to 50/s within a. Obviously not as good as handwriting.
By testing my question is:
1. Does the performance of dapper in high concurrency really drop a lot, or is there a problem with my test method?
2. If the dapper really drops a lot under high concurrency, how to improve his problem?
Test code Download
Http://pan.baidu.com/s/1dDAjZnN
One dapper high concurrency test report record. Results....