hyperledger-labs / SmartBFT

Implementation of the SmartBFT consensus library (https://arxiv.org/abs/2107.06922)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WAL: use datasync instead of sync

tock-ibm opened this issue · comments

After writing a record, use file datasync rather than sync, for performance.
This code may be OS/platform dependent.

I don't think we will gain enough performance for this to justify doing this:

2020-05-26 09:11:48.739 UTC [orderer.consensus.smartbft.consensus] processProposal -> INFO a9f Verifying proposal took 131.947362ms channel=systemchannel
2020-05-26 09:11:48.779 UTC [orderer.consensus.smartbft.consensus] processProposal -> INFO aa0 Persisted pre-prepare in 12.516303ms channel=systemchannel
2020-05-26 09:11:48.779 UTC [orderer.consensus.smartbft.consensus] processProposal -> INFO aa1 Processed proposal with seq 167 channel=systemchannel
2020-05-26 09:11:48.808 UTC [orderer.consensus.smartbft.consensus] processPrepares -> INFO aa2 2 collected 6 prepares from [1 4 3 6 10 7] in 28.122475ms channel=systemchannel
2020-05-26 09:11:48.814 UTC [orderer.consensus.smartbft.consensus] processPrepares -> INFO aa3 Persisted prepare in WAL in 1.539464ms channel=systemchannel
2020-05-26 09:11:48.814 UTC [orderer.consensus.smartbft.consensus] processPrepares -> INFO aa4 Processed prepares for proposal with seq 167 channel=systemchannel
2020-05-26 09:11:48.854 UTC [orderer.consensus.smartbft.consensus] processCommits -> INFO aa5 2 collected 6 commits from [3 7 1 8 6 9] channel=systemchannel
2020-05-26 09:11:48.854 UTC [orderer.consensus.smartbft.consensus] func1 -> INFO aa6 Collected and verified commits took 39.923583ms channel=systemchannel
2020-05-26 09:11:48.854 UTC [orderer.consensus.smartbft.consensus] prepared -> INFO aa7 2 processed commits for proposal with seq 167 channel=systemchannel
2020-05-26 09:11:48.855 UTC [orderer.consensus.smartbft.consensus] decide -> INFO aa8 Deciding on seq 167 channel=systemchannel
2020-05-26 09:11:48.855 UTC [orderer.consensus.smartbft.consensus] startNextSeq -> INFO aa9 Sequence: 167-->168 channel=systemchannel
2020-05-26 09:11:48.891 UTC [orderer.consensus.smartbft.consensus] prepared -> INFO aaa Commit took 36.143712ms channel=systemchannel