-
Notifications
You must be signed in to change notification settings - Fork 402
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
Caliper generates reports of TPS issues encountered!!! 6Tps? #333
Comments
@zsh122958 I think we'll need more context. Especially about your user test module, since it can affect the precision of scheduling, and it's written by you :) |
@aklenik |
@zsh122958 As I see, you wrote your own adapter to support a new platform. In that case, most of the code that is running is your own code. The critical path is the following for Caliper: rate controller => user test module => invokeSmartContract => rate controller => ... You use 5 client processes to generate a 200TPS workload, which means 40TPS per client process. This means that the rate controller code needs to be executed at least every 24ms to keep this pace. If you use more client, then this number can be higher (20 client => 10 TPS per client => 100ms duration between rate controller calls). General advice: don't use sync calls in this path. I think line 54 is your problem. It blocks the event loop of Node.js so the rate controller is not called quickly enough. You should use async calls instead (the code will hardly change with the async/await pattern). |
In the underlying database of blockchain, 5,000 pieces of data are received. |
@zsh122958 hello, now your tps result seems very good, could you advice me how you build your network? what's your configuration? what block chain you test? fabirc? |
@shiningfrog |
@zsh122958 ok, thank you! by the way, could you give some advice in how to improve the tps first? my tps is only 20+ in caliper(open.js). |
@zsh122958 , the result shows the backend blockchain system throughput equals to the successful transactions' number. It is caused by original bug, and was fixed by PR #274 . You can use the newest version test it again. |
@shiningfrog |
@zsh122958 As @panyu4 suggested, try rebasing your code to the up-to-date Caliper version, it had some bugs fixed recently. It shouldn't affect your adapter code. |
@aklenik info: [bench-flow.js]: |
@zsh122958 Can you share the entire code file of your adapter (as GitHub gist)? The TPS is still shady in your report. |
Relating to a custom adapter implementation, closing it. |
Caliper generates reports of TPS issues encountered
Pressure test 1000 trades 100tps
The first problem arose when the transaction was sent
Below the figure is the generated TPS report
The sync-request function is introduced in sending transactions
The success of the transaction is shown in the figure below.
{ code: '0000',
msg: 'exec successfully',
txid: '74ee9d9890ae45d687ac58cad26d07fb' }
Use the function request-promise introduced by asynchronous sending transactions
The blockchain network could not receive information if the transaction failed, as shown in the figure
Here is the TPS I tested manually
How to better position the way of the problem!!!
I think it's because the synchronization function affects TPS
The text was updated successfully, but these errors were encountered: