Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fabric1.0的性能情况 #51

Closed
bigstar119 opened this issue Jul 31, 2017 · 9 comments
Closed

Fabric1.0的性能情况 #51

bigstar119 opened this issue Jul 31, 2017 · 9 comments
Assignees
Labels

Comments

@bigstar119
Copy link

bigstar119 commented Jul 31, 2017

版主好,本人详细阅读了blockchain_guide.pdf的相关内容,对于Fabric性能这块有些疑问。性能与评测一章中提到Fabric0.6版本的单客户端连接情况下,tps 基本在 190 ~ 300 范围内。那Fabric1.0版本您测试过吗?大体性能是多少?前几天Fabric1.0已经释放了,我在本机测试了一下性能,invoke操作的tps数只有20左右,而且1000并发下,后台还会报一些错误。这个跟Fabric0.6的性能测试结果差距很大,不解是什么原因?另外,Fabric1.0中有batch操作的API吗?

@yeasy
Copy link
Owner

yeasy commented Aug 1, 2017

Hi, can u help post the steps/env on how u make the evaluation?

Thanks!

@bigstar119
Copy link
Author

bigstar119 commented Aug 1, 2017

software environment:
Ubuntu 14.04.5 x86-64
docker: 17.03.1-ce
fabric: 1.0-release

hardware environment
cpu: 4 core
memory: 8G
disk: 500G

OK, I follow the offical e2e demo deploy a fabric netwok. it has 2 org in the demo and include 2 ca, 1 order, 4 peers, 1 zookeeper, 1 kafa, 4 couchdbs and 1 cli .
because MVCC_READ_CONFICT error,I modify the offical chaincode example_cc.go, i add a set method, muti thread call set method will not trigger MVCC_READ_CONFICT error.
then I use fabric-sdk-java-1.0.0 send invoke transactions in muti threads to the fabric netwok.
100 threads everythings goes fine ,I got 10TPS reuslt . when on 1000 threads I got background error like below :
2017-08-01 16:41:02-[Eth] ERROR [pool-4-thread-377] Channel.sendTransaction(2172) | Channel mychannel unsuccessful sendTransaction to orderer
org.hyperledger.fabric.sdk.exception.TransactionException: Send transactions failed. Reason: timeout
at org.hyperledger.fabric.sdk.OrdererClient.sendTransaction(OrdererClient.java:163)
at org.hyperledger.fabric.sdk.Orderer.sendTransaction(Orderer.java:133)
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2159)
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2088)
at org.hyperledger.fabric.sdk.Channel.sendTransaction(Channel.java:2074)
at com.neusoft.fabric.junit.blo.ChainCodeService.invokeChainCode(ChainCodeService.java:163)
at com.neusoft.fabric.junit.testcase.SetMoneyCallable.invokeChainCode(SetMoneyCallable.java:93)
at com.neusoft.fabric.junit.testcase.SetMoneyCallable.call(SetMoneyCallable.java:60)
at com.neusoft.fabric.junit.testcase.SetMoneyCallable.call(SetMoneyCallable.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-08-01 16:41:02-[Eth] ERROR [pool-4-thread-377] SetMoneyCallable.invokeChainCode(101) | java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: Channel mychannel failed to place transaction 83b4d415f1590d1eb21a4e7644a748f659366208add5e58aa61129004c0b1739 on Orderer. Cause: UNSUCCESSFUL

docker-files.zip includes the detail of my testcase:
fabric-network:docker-files\linux-amd64\docker-compose-e2e.yaml
chaincode:docker-files\example_cc.go
testcase:docker-files\fabric-sdk-java-1.0.0\src\test\java\com\neusoft\fabric\junit\testcase
StepByStep.java createChannel,deployChaincode
PerformanceTestCase.java muti threads testCase

docker-files.zip

@yeasy
Copy link
Owner

yeasy commented Aug 2, 2017

Is the cpu/mem high when u did the experiment?

I suspect u are running fabric and sdk at the same node, which will occupy too much memory.

@bigstar119
Copy link
Author

I check the CUP/Memory cost, they are not high...when busy CPU: 80% of 1 core,Mem:60% of total.
[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:66,finishCount:30,errorCount:0
2017-08-02 14:00:02-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:112,finishCount:86,errorCount:0
2017-08-02 14:00:07-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:182,finishCount:136,errorCount:0
2017-08-02 14:00:12-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:277,finishCount:186,errorCount:0
2017-08-02 14:00:17-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:408,finishCount:236,errorCount:0
2017-08-02 14:00:22-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:500,finishCount:296,errorCount:0
2017-08-02 14:00:27-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:500,finishCount:356,errorCount:0
2017-08-02 14:00:32-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:500,finishCount:416,errorCount:0
2017-08-02 14:00:37-[Eth] WARN [Timer-0] TaskMonitor$1.run(23) | startCount:500,runningCount:500,endorserFinishCount:500,finishCount:486,errorCount:0
2017-08-02 14:00:37-[Eth] INFO [main] PerformanceTestCase.invokeChaincode(153) | 交易执行完毕,用户数:500,耗时:45518 ms,平均耗时:24590 ms,最大耗时:45177 ms,最小耗时:2585 ms,TPS:10.98

@bigstar119
Copy link
Author

bigstar119 commented Aug 2, 2017

endorser is fast, send to order is very slow

@bigstar119
Copy link
Author

@yeasy 您之前测试过Fabric1.0的性能吗?是什么样的结果?当时的硬软件配置是什么样的?

@yeasy
Copy link
Owner

yeasy commented Aug 7, 2017

Can u try the official tool? fabric/test/tools/PTE.

There's some report with thousands of tps with concurrent config.

@bigstar119
Copy link
Author

thank you for answer , I will try it later.

@bigstar119
Copy link
Author

@yeasy can your share the report of PTE?

@yeasy yeasy closed this as completed Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants