简体   繁体   English

风暴过程增加记忆力

[英]Storm process increasing memory

I am implementing a distributed algorithm for pagerank estimation using Storm. 我正在使用Storm实现分布式算法进行pagerank估计。 I have been having memory problems, so I decided to create a dummy implementation that does not explicitly save anything in memory, to determine whether the problem lies in my algorithm or my Storm structure. 我一直有内存问题,所以我决定创建一个虚拟实现,它不会在内存中明确保存任何内容,以确定问题是在我的算法还是我的Storm结构中。

Indeed, while the only thing the dummy implementation does is message-passing (a lot of it), the memory of each worker process keeps rising until the pipeline is clogged. 实际上,虽然虚拟实现所做的唯一事情就是消息传递(很多),每个工作进程的内存不断上升,直到管道被阻塞。 I do not understand why this might be happening. 我不明白为什么会这样。

My cluster has 18 machines (some with 8g, some 16g and some 32g of memory). 我的群集有18台机器(一些有8g,一些16g和一些32g的内存)。 I have set the worker heap size to 6g (-Xmx6g). 我已将工作堆大小设置为6g(-Xmx6g)。

My topology is very very simple: One spout One bolt (with parallelism). 我的拓扑非常简单:一个喷口一个螺栓(具有平行度)。

The bolt receives data from the spout (fieldsGrouping) and also from other tasks of itself. 螺栓从喷口(fieldsGrouping)接收数据,也从其自身的其他任务接收数据。

My message-passing pattern is based on random walks with a certain stopping probability. 我的消息传递模式基于具有一定停止概率的随机游走。 More specifically: The spout generates a tuple. 更具体地说:喷口产生一个元组。 One specific task from the bolt receives this tuple. 螺栓的一个特定任务接收这个元组。 Based on a certain probability, this task generates another tuple and emits it again to another task of the same bolt. 基于一定的概率,此任务生成另一个元组并将其再次发送到同一螺栓的另一个任务。

I am stuck at this problem for quite a while, so it would be very helpful if someone could help. 我在这个问题上坚持了很长一段时间,所以如果有人可以提供帮助,那将会非常有帮助。

Best Regards, Nick 最诚挚的问候,尼克

It seems you have a bottleneck in your topology, ie, a bolt receivers more data than in can process. 您的拓扑结构似乎存在瓶颈,即螺栓接收的数据多于可处理的数据。 Thus, the bolt's input queue grows over time consuming more and more memory. 因此,螺栓的输入队列随着时间的推移而增长,消耗的内存越来越多。

You can either increase the parallelism for the "bottleneck bolt" or enable fault-tolerance mechanism which also enables flow-control via limited number of in-flight tuples ( https://storm.apache.org/documentation/Guaranteeing-message-processing.html ). 您可以增加“瓶颈螺栓”的并行度或启用容错机制,这也可以通过有限数量的飞行中元组实现流量控制( https://storm.apache.org/documentation/Guaranteeing-message-processing .html )。 For this, you also need to set "max spout pending" parameter. 为此,您还需要设置“max spout pending”参数。

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

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