I tested according to the examples in the seata-sample and got such results
The throughput without globaltransaction annotation is 12 times higher than with annotations.There are also some errors when adding annotation.
I used the following code for the test.
https://github.com/seata/seata-samples/tree/master/seata-spring-boot-starter-samples
Ⅵ. Environment:
- JDK 1.8:
- Seata 1.4.2:
- The same goes for seata version 2.0.0
1条答案
按热度按时间tpgth1q71#
如果你了解两阶段都增加了多少次网络和磁盘io开销,那么你对这个结果就不会太过意外了?其中包括了seata-server与数据库,client与seata-server,一阶段和二阶段决议.我建议你使用
store.mode
为file模式进行测试,这样的话可以排除掉seata-server数据库的网络io和磁盘io的开销. 这段话翻译成英文If you understand how much additional network and disk IO overhead was added in both phases, you won't be too surprised by this result. This includes interactions between the Seata server and the database, the client and the Seata server, as well as the first and second phase resolution. I suggest conducting tests using
store.mode
set to file mode; this can eliminate the network and disk IO overhead of the Seata server database.