alphanet上节点同步极慢
3 个回答
- 投票数
-
- 2019-03-07
如果看到太多对等消息,则可以尝试添加更多对等.该脚本应适用于alphanet(您需要安装
jq
)for j in 0 1; do for i in `curl -s "http://api.alphanet.tzscan.io/v3/network?state=running&p=$j&number=50" \ | jq -r '.[] | .point_id' | xargs`; do # handle ipv4 or ipv6 numparts=$(echo $i | awk -F: '{print NF}') basenum=$((numparts-1)) port=$(echo $i | cut -d: -f$numparts) base=$(echo $i | cut -d: -f1-$basenum) formatted="[$base]:$port" echo "Connecting $formatted..." ~/tezos/tezos-admin-client connect address $formatted done done
信用归于此脚本的创建者.
You could try adding more peers if you are seeing the too few peers message. This script should work for the alphanet (you need
jq
installed)for j in 0 1; do for i in `curl -s "http://api.alphanet.tzscan.io/v3/network?state=running&p=$j&number=50" \ | jq -r '.[] | .point_id' | xargs`; do # handle ipv4 or ipv6 numparts=$(echo $i | awk -F: '{print NF}') basenum=$((numparts-1)) port=$(echo $i | cut -d: -f$numparts) base=$(echo $i | cut -d: -f1-$basenum) formatted="[$base]:$port" echo "Connecting $formatted..." ~/tezos/tezos-admin-client connect address $formatted done done
Credit goes to creator of this script.
-
- 2019-03-06
T2实例是通用计算实例,具有较低至中等的网络性能,并且未针对输入/输出操作(IOPS)进行优化.Tezos的所有帐户都需要大量的IO.
尝试启动一个存储优化实例(H1/I3/D2),我怀疑它将提供更好的性能.
T2 instances are general purpose compute instances which have low to moderate network performance and are not optimised for Input/Output operations (IOPS). Tezos is very IO intensive by all accounts.
Try spinning up a Storage Optimised instance (H1/I3/D2) and I suspect it will provide better performance.
-
虽然确实更快,但仍然很慢,并且在弹出"连接太少"消息时经常完全停止同步.T2介质完全能够在合理的时间内同步整个以太坊区块链,因此我很难相信Tezos的要求如此之高,以至于它在测试网上的速度应该慢几个数量级.这里肯定还有另一个因素在起作用.Whilst this is indeed faster, it's still pretty slow, and frequently stops syncing entirely when the 'too few connections' message pops up. A t2 medium is perfectly capable of syncing the entire ethereum blockchain in reasonable time, so I have a hard time believing Tezos is so much more demanding that it should be orders of magnitude slower on just the testnet. There must be another factor at play here.
- 0
- 2019-03-07
- AndyK
-
我同意应该如此,但事实并非如此.可以从运行一些基准以确定真正确定完全同步所需的IOPS类型中受益.I agree it shouldn't be the case it is that intensive however it seems to be. The community would benefit from some benchmarks being run to determine actually what sort of IOPS does a full sync need.
- 0
- 2019-03-07
- xtzbaker
-
一位面包师告诉我,AWSi3.larges是Tezos节点最有效的实例,特别是对于烘焙而言,由于NVMe SSD的出色性能.我还发现磁盘性能通常是VPS的瓶颈.I was told by a baker that AWS i3.larges are the most effective instances for Tezos nodes, especially for baking due to the great performance of NVMe SSDs. I also found that disk performance usually is the bottleneck on a VPS.
- 0
- 2019-03-21
- cryptodad
-
- 2019-03-07
解决方案:实例类型正在更改
在为Alphanet同步节点时,我尝试了多个实例:从T2.micro到T3.xlarge.
在某些时候,我认为RAM大小或网络性能可能在这里起作用.但是,即使是T3.xlarge实例也无法使整个节点快速同步.
真正有用的是定期更改实例类型. 您可能已经注意到,节点刚开始时的同步速度要快得多.然后,一段时间后,它又变得非常缓慢.
我观察到,更大的AWS实例类型将不允许您快速完成此操作.
该计划可能是:
- 停止面包师,背书人,原告,然后停止节点本身
- 停止t2.medium实例
- 将实例的类型更改为t2.small
- 启动t2.small实例
- 启动该节点,然后启动贝克,背书人和原告.开始时 这些过程不会忘记将输出重定向到日志文件 分别是:tezos.log,baker.log,endorser.log和accuser.log
- 开始观察新块在新块上同步的速度
实例.使用
tail -f tezos.log
.您必须记住新实例的阻止 从 开始
- 将其放置一段时间.您可能想稍后再来看看自启动节点以来已同步了多少个块.如果我没记错的话,它可能会非常快地同步多达10000个块,尽管这取决于您选择的实例.例如,您可能选择了t2.large而不是t2.small.
- 当同步过程最终将减慢速度时,请再次重复操作.这次从t2.small迁移到t2.medium.它将为您提供另外1万个快速同步的块.
尽管需要一些手动干预,但此方法有效.
PS:为获得更好的结果,您可以使用t2.large +t2.medium作为更改对,而不是如上所述的t2.small +t2.medium.但是差异不会很大.
solution : instance type changing
while syncing the node for Alphanet I have tried multiple instances : from T2.micro to T3.xlarge.
At some point I thought that RAM size or Network performance may play a role here. But Even T3.xlarge instance did not bring the whole node synced fast.
What really helped is changing the instance types periodically. You may have noticed that node is syncing much faster in very beginning, when it just started. Then, after some time, it became very slow again.
I've made an observation that even bigger AWS instance type won't allow you to finish this operation fast in one take .
The plan may be:
- Stop the baker, endorser, accuser and then stop the node itself
- Stop the t2.medium instance
- Change the type of your instance to t2.small
- Start the t2.small instance
- Start the node and then baker, endorser, accuser. While starting these processes do not forget to redirect the output to log files respectively: tezos.log, baker.log, endorser.log and accuser.log
- Start watching how fast new blocks are getting synced on a new
instance. Use
tail -f tezos.log
. You have to remember the block that new instance has started from - Leave it alone for sometime. You may want to come later and see how many blocks have been synced since you started the node. If I recall correctly, it may sync very fast up to 10 000 blocks or so, though it depends on the instance you have chosen. Instead of t2.small, you may have selected t2.large for instance.
- When sync process will eventually slow down, repeat operation again. This time migrate from t2.small to t2.medium. It will give you another 10k blocks synced fast.
This approach worked, though it required some manual interventions.
PS: for better results you may use t2.large + t2.medium as a changing pair, not t2.small + t2.medium as described above. But the difference won't be significant.
-
我怀疑您看到TX实例最初的良好性能会逐渐降低的原因是因为这些实例类型的设计目的是使它们可以临时增加其IO和CPU以应对少量活动的增加.这称为突发,仅持续很短的时间,然后才能恢复为平庸的性能.为了获得持续的IO或CPU负载,需要使用其他实例类型.对于节点同步,肯定是这种情况.I suspect the reason you see initial good performance on the TX instances that slowly degrades is because these instance types are designed so they can temporarily increase their IO and CPU to deal with small periods of increased activity. This is called bursting and only lasts for a short time before reverting to a more mediocre performance. For sustained IO or CPU load a different instance type is required. This would certainly be the case for a node sync.
- 0
- 2019-03-07
- xtzbaker
-
使用上面的Alphanet DB收到以下错误: 3月7日09:25:47-node.main:启动Tezos节点... 3月7日09:25:47-node.main:没有本地对等发现. 3月7日09:25:47-node.main:对等方的全局ID:idrJtoLevBnyf6ZzUqcmyGBFKUssa7 3月7日09:25:47-node.worker:自举链... tezos-node:错误: 商店中缺少密钥:chain/8eceda2f/genesis/hashReceiving the following error using the Alphanet DB above: Mar 7 09:25:47 - node.main: Starting the Tezos node... Mar 7 09:25:47 - node.main: No local peer discovery. Mar 7 09:25:47 - node.main: Peer's global id: idrJtoLevBnyf6ZzUqcmyGBFKUssa7 Mar 7 09:25:47 - node.worker: bootstrapping chain... tezos-node: Error: Missing key in store: chain/8eceda2f/genesis/hash
- 0
- 2019-03-07
- AndyK
因此,我在AWS EC2t2.medium实例上设置了一个Tezos节点.我按照此处的说明进行操作,但对于alphanet代替mainnet.
我了解到: ./tezos-node运行--rpc-addr:8732
它正在运行并正在同步,但是非常慢.在运行了几个小时后,从"客户端获取时间戳"返回的数据仅向前移动了一两天.我也经常收到类似 p2p.maintenance:连接太少(5)
我尝试打开所有进出实例的端口,以确保没有流量被阻塞.这没什么区别.怎么了?我需要更改什么?