One Dapper high concurrency test report record... results..., dapper Test report
I have heard that dapper has a strong data processing capability. I also like it very much. However, my recent stress test was unexpected ....
I haven't written anything for a long time, and I feel that I don't know how to express my meaning. in addition, this test was just started by myself. I do not know whether the test ideas and methods are correct. let's talk about anything.
Download test code
Http://pan.baidu.com/s/1dDzuEi9
Two db operations are available.
1. operate databases only in mysql
2 dapper db operations
Test method 1
A user runs code n times and consumes test code execution. In this mode, the efficiency of the dapper CURD operation is basically the same as that of the pure handwritten SQL statement. It is a comparison of several operations.
In this case, we can see that dapper and handwriting Code have little performance difference and even have advantages. However, we can find that dapper actually consumes more resources in cpu computing and gc collection.
Of course, the number of tests here is not high. You can use a higher number of times to press it. I have also tried to run times for 10 times, which is not very different.
Test method 2
Use the loadrunner stress testing tool to achieve multi-user concurrency.
Dapper simulates 300 user requests and randomly flip pages
Original Ecological mysql simulates 300 user requests and randomly flip pages
Comparison can be seen
Comparison item (300 concurrent) |
Dapper |
Original mysql |
Response time unit: s |
4.3 |
1.4 |
Transaction pass count/s |
About 108 |
310-350 |
|
|
|
|
|
|
|
|
|
The response of dapper is greatly reduced when two key parameters are concurrent. when the concurrency reaches 500. this value is also reduced to 11 s. and the number of transactions dropped to 50 per second. it is obviously inferior to handwriting.
My problem after passing the test is:
1. Is the performance of dapper significantly reduced under high concurrency, or is there a problem with my testing method?
2. If the number of dapper drops significantly in high concurrency, how can this problem be improved?
Download test code
Http://pan.baidu.com/s/1dDzuEi9