简体   繁体   English

发送大量事务期间内存池溢出

[英]Overflowing mempool during sending a lot of transaction

During sending a lot of transactions using differenr rest servers (we use 2 or 4 nodes/servers) mempool always overflowing and servers starts to overload, the blocks closed for a very long time, it's depending on the amount of transaction, the more transactions the more time for closing blocks need, it always between from 20sec to 20min. 在使用不同的其余服务器(我们使用2个或4个节点/服务器)发送大量事务的过程中,内存池总是溢出并且服务器开始过载,块关闭了很长时间,这取决于事务量,更多的事务关闭块需要更多的时间,通常在20秒到20分钟之间。 For example when i send 20k txs, mempool is filled up to 20k transaction, then after 20 sec block closed with all transactions. 例如,当我发送20k txs时,mempool会填满20k笔交易,然后在20秒内关闭所有交易。 If we send 300k transactions, mempool filled up to +-280k, and during 20 minutes closed 3 blocks with ~123, ~123, ~25 txs, but in this 20 minutes tendermint always errors like "err="pong timeout"", "err=EOF", "used of closed network connection" and so on. 如果我们发送30万笔交易,则内存池最多会填满+ -280k,并在20分钟内用〜123,〜123,〜25 txs关闭了3个区块,但是在这20分钟内,minimmint始终会出现“ err =“ pong timeout””错误, “ err = EOF”,“用于封闭的网络连接”等等。 Also we use cosmos-sdk we can't turn off autogeneration block. 另外,我们使用cosmos-sdk无法关闭自动生成块。 https://github.com/tendermint/tendermint/issues/3905 - it is github issue, check it for more information https://github.com/tendermint/tendermint/issues/3905-这是github问题,请查看更多信息

I tried change nodes configuration, but not much changed 我尝试更改节点配置,但更改不多

I don't know what I need to do, but we have troubles with mempool and we haven't got resolve. 我不知道该怎么办,但我们在内存池方面遇到了麻烦,也没有决心。 Guys do u have some idea what can I do with this? 伙计们,您是否知道该怎么办?

Tendermint employs two routines p2p/conn/connection.go#recvRoutine and p2p/conn/connection.go#sendRoutine to handle incoming messages and send responses, and which are both sequential. Tendermint使用两个例程p2p/conn/connection.go#recvRoutinep2p/conn/connection.go#sendRoutine来处理传入消息和发送响应,并且这两个例程都是顺序的。 Therefore, if one node is processing new txs and calling reactors iteratively, it is blocked before all reactors (pl reference to node/node.go#createSwitch for basic reactors). 因此,如果一个节点正在处理新的tx并迭代调用反应堆,则它会在所有反应堆之前被阻塞(请参考node/node.go#createSwitch用于基本反应堆)。

Tendermint verifies signatures before adding txes to mempool, which takes about .5ms according to config/config.go#DefaultMempoolConfig , so verifying 20k txes literally takes about 10s not including other operation costs. Tendermint在将tx添加到mempool之前先验证签名,根据config/config.go#DefaultMempoolConfig大约需要0.5毫秒,因此验证20k tx实际上需要大约10 s,这不包括其他操作成本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM