<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>《Apache Storm内部原理分析》的评论</title>
	<atom:link href="http://shiyanjun.cn/archives/1472.html/feed" rel="self" type="application/rss+xml" />
	<link>http://shiyanjun.cn/archives/1472.html</link>
	<description>简单之美，难得简单，享受简单的唯美。</description>
	<lastBuildDate>Wed, 19 Feb 2025 08:08:30 +0000</lastBuildDate>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.2</generator>
	<item>
		<title>作者：mooseen</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-59264</link>
		<dc:creator><![CDATA[mooseen]]></dc:creator>
		<pubDate>Sun, 22 Oct 2017 01:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-59264</guid>
		<description><![CDATA[博主，你好！有一个问题困扰了一个星期悬而未决，所以想请教一下你，听听博主的指点。我在使用Storm KafkaSpout时，在storm ui 会一直显示kafkaspout 有消息失败，我查阅了很多资料，基本的解释是：ACK超时，但是我看了我的bolt处理能力，延迟和capacity值都很低。0.1都不到而且整个storm的qps也不高，大概就7000的样子。之前压测的时候qps 3w/s也没有问题。所以storm topology的配置(worker executor)也都是按照3w/s的处理速度配置的。我重新了kafkaspout fail方法，在fail方法中添加了Log,确实在worker.log会输出spout fail的消息。在kafka spout出现消息fail之前调整过一次storm 集群zookeeper节点。当时storm已经运行了一阵子了。调整之前也没有kafkaspout fail的现象。当时调整完zk集群后，重启了storm的nimbus和supervisor，然后发现storm自动进行了worker rebalence。之后就一直出现kafka spout fail。即使重新提交topology也是一样。目前不知道原因出在什么地方。从ack的fail机制来看，ack fail是ack超时导致，但是根据目前bolt的处理速度和整体的qps来看，不可能存在ack超时，而且之前压测3w/s qps也没有出现这个问题。所以想听听博主有没有什么好的建议,或是我该从什么地方切入问题。谢谢了！]]></description>
		<content:encoded><![CDATA[<p>博主，你好！有一个问题困扰了一个星期悬而未决，所以想请教一下你，听听博主的指点。我在使用Storm KafkaSpout时，在storm ui 会一直显示kafkaspout 有消息失败，我查阅了很多资料，基本的解释是：ACK超时，但是我看了我的bolt处理能力，延迟和capacity值都很低。0.1都不到而且整个storm的qps也不高，大概就7000的样子。之前压测的时候qps 3w/s也没有问题。所以storm topology的配置(worker executor)也都是按照3w/s的处理速度配置的。我重新了kafkaspout fail方法，在fail方法中添加了Log,确实在worker.log会输出spout fail的消息。在kafka spout出现消息fail之前调整过一次storm 集群zookeeper节点。当时storm已经运行了一阵子了。调整之前也没有kafkaspout fail的现象。当时调整完zk集群后，重启了storm的nimbus和supervisor，然后发现storm自动进行了worker rebalence。之后就一直出现kafka spout fail。即使重新提交topology也是一样。目前不知道原因出在什么地方。从ack的fail机制来看，ack fail是ack超时导致，但是根据目前bolt的处理速度和整体的qps来看，不可能存在ack超时，而且之前压测3w/s qps也没有出现这个问题。所以想听听博主有没有什么好的建议,或是我该从什么地方切入问题。谢谢了！</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：quzijing</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-59198</link>
		<dc:creator><![CDATA[quzijing]]></dc:creator>
		<pubDate>Tue, 05 Sep 2017 04:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-59198</guid>
		<description><![CDATA[嗯，感谢博主，问题的症结确实是spout发的太快，导致netty这边出了问题。在dump堆信息后，发现OOM的原因是消息大部分堆积在了netty端，我觉得可能是瞬时spout速度太快，netty来不及发，结果netty中存了很多TaskMessage，放在了一个叫做writeRequestQueue的队列中。我给worker分配的是2G内存，在OOM的时候发现netty的这个writeRequestQueue占用了1.9个多G。另外我尝试设置了MaxSpoutPending和增加Bolt并行度，发现没有起什么作用，因此应该不是Bolt消费太慢导致。Worker之前有设置内存为4G，但是问题还是一样。随后我对spout发射消息做了均匀化处理，发现比没有均匀化时性能提升了2倍之多。所以我想是不是Storm这边的netty使用不当？但是道理上来说，设置了MAX.SPOUT.PENDING,spout应该会停止发射，那么应该不会对netty这边造成冲击，但是按照现在的情况来看，什么原因导致netty会堆积大量的内存呢？]]></description>
		<content:encoded><![CDATA[<p>嗯，感谢博主，问题的症结确实是spout发的太快，导致netty这边出了问题。在dump堆信息后，发现OOM的原因是消息大部分堆积在了netty端，我觉得可能是瞬时spout速度太快，netty来不及发，结果netty中存了很多TaskMessage，放在了一个叫做writeRequestQueue的队列中。我给worker分配的是2G内存，在OOM的时候发现netty的这个writeRequestQueue占用了1.9个多G。另外我尝试设置了MaxSpoutPending和增加Bolt并行度，发现没有起什么作用，因此应该不是Bolt消费太慢导致。Worker之前有设置内存为4G，但是问题还是一样。随后我对spout发射消息做了均匀化处理，发现比没有均匀化时性能提升了2倍之多。所以我想是不是Storm这边的netty使用不当？但是道理上来说，设置了MAX.SPOUT.PENDING,spout应该会停止发射，那么应该不会对netty这边造成冲击，但是按照现在的情况来看，什么原因导致netty会堆积大量的内存呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Yanjun</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-59183</link>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
		<pubDate>Sun, 03 Sep 2017 04:28:17 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-59183</guid>
		<description><![CDATA[1、Spout和Bolt在不在同一个Worker中，关系不大，你要给每个Worker的内存足够。
2、看问题的现象是，Spout发的太快，以至于后面的Bolt处理不过来，可以尝试调大Bolt的并行度，调小Spout的并行度。
3、设置下topology.max.spout.pending的值，默认是1，可以调成比如200，根据实际测试情况观察，调大或调小。
4、将Acker数量调大点：topology.acker.executors，默认为1，可以调成2或3试试，不建议调的太大。
5、其它一些参数，可以参考这里：https://github.com/apache/storm/blob/master/conf/defaults.yaml]]></description>
		<content:encoded><![CDATA[<p>1、Spout和Bolt在不在同一个Worker中，关系不大，你要给每个Worker的内存足够。<br />
2、看问题的现象是，Spout发的太快，以至于后面的Bolt处理不过来，可以尝试调大Bolt的并行度，调小Spout的并行度。<br />
3、设置下topology.max.spout.pending的值，默认是1，可以调成比如200，根据实际测试情况观察，调大或调小。<br />
4、将Acker数量调大点：topology.acker.executors，默认为1，可以调成2或3试试，不建议调的太大。<br />
5、其它一些参数，可以参考这里：https://github.com/apache/storm/blob/master/conf/defaults.yaml</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：quzijing</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-59177</link>
		<dc:creator><![CDATA[quzijing]]></dc:creator>
		<pubDate>Fri, 01 Sep 2017 07:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-59177</guid>
		<description><![CDATA[博主，你好，请教您一个问题，我在对storm进行压测的时候发现，当message大小为5kb时，会出现spout序列化OOM的问题,。测试环境是storm 1.1.1，同一节点，不同worker,spout和bolt的并行度为1.当spout和bolt在同一worker中时，则没有这个问题，另外当调小message大小或者topology.executor.send.buffer.size(值为8)时，OOM的问题也会解决，但是如果将topology.executor.send.buffer.size调下,storm的性能下降的很厉害(相当于是限流了吧）。dump spout heap,发现未发送的消息有差不多33万，占了1.6G的内存，worker内存大小是2G。现在的问题是不太清楚问题的根本原因，以及解决方法。我的猜测是因为5kb的数据是string,导致kryo序列化变慢，导致消息在spout端堆积，导致OOM?希望博主能给一点建议。以下是OOM信息：
java.lang.OutOfMemoryError: GC overhead limit exceeded at com.esotericsoftware.kryo.io.Output.toBytes(Output.java:129) at org.apache.storm.serialization.KryoTupleSerializer.serialize(KryoTupleSerializer.java:45) at org.apache.storm.daemon.worker$mk_transfer_fn$transfer_fn__5183.invoke(worker.clj:193) at org.apache.storm.daemon.executor$start_batch_transfer__GT_worker_handler_BANG_$fn__4870.invoke(executor.clj:309) at org.apache.storm.disruptor$clojure_handler$reify__4465.onEvent(disruptor.clj:40) at org.apache.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:482) at org.apache.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:460) at org.apache.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:73) at org.apache.storm.disruptor$consume_loop_STAR_$fn__4482.invoke(disruptor.clj:83) at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:484) at clojure.lang.AFn.run(AFn.java:22) at java.lang.Thread.run(Thread.java:748)

最后感谢博主花这么多时间看完我的问题，谢谢！]]></description>
		<content:encoded><![CDATA[<p>博主，你好，请教您一个问题，我在对storm进行压测的时候发现，当message大小为5kb时，会出现spout序列化OOM的问题,。测试环境是storm 1.1.1，同一节点，不同worker,spout和bolt的并行度为1.当spout和bolt在同一worker中时，则没有这个问题，另外当调小message大小或者topology.executor.send.buffer.size(值为8)时，OOM的问题也会解决，但是如果将topology.executor.send.buffer.size调下,storm的性能下降的很厉害(相当于是限流了吧）。dump spout heap,发现未发送的消息有差不多33万，占了1.6G的内存，worker内存大小是2G。现在的问题是不太清楚问题的根本原因，以及解决方法。我的猜测是因为5kb的数据是string,导致kryo序列化变慢，导致消息在spout端堆积，导致OOM?希望博主能给一点建议。以下是OOM信息：<br />
java.lang.OutOfMemoryError: GC overhead limit exceeded at com.esotericsoftware.kryo.io.Output.toBytes(Output.java:129) at org.apache.storm.serialization.KryoTupleSerializer.serialize(KryoTupleSerializer.java:45) at org.apache.storm.daemon.worker$mk_transfer_fn$transfer_fn__5183.invoke(worker.clj:193) at org.apache.storm.daemon.executor$start_batch_transfer__GT_worker_handler_BANG_$fn__4870.invoke(executor.clj:309) at org.apache.storm.disruptor$clojure_handler$reify__4465.onEvent(disruptor.clj:40) at org.apache.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:482) at org.apache.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:460) at org.apache.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:73) at org.apache.storm.disruptor$consume_loop_STAR_$fn__4482.invoke(disruptor.clj:83) at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:484) at clojure.lang.AFn.run(AFn.java:22) at java.lang.Thread.run(Thread.java:748)</p>
<p>最后感谢博主花这么多时间看完我的问题，谢谢！</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Yanjun</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-58807</link>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
		<pubDate>Tue, 27 Jun 2017 07:03:12 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-58807</guid>
		<description><![CDATA[不好意思，网站遭到攻击，现在已经恢复了。]]></description>
		<content:encoded><![CDATA[<p>不好意思，网站遭到攻击，现在已经恢复了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：delin</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-58805</link>
		<dc:creator><![CDATA[delin]]></dc:creator>
		<pubDate>Tue, 27 Jun 2017 01:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-58805</guid>
		<description><![CDATA[博主，你的站点图片都挂了，好难受啊]]></description>
		<content:encoded><![CDATA[<p>博主，你的站点图片都挂了，好难受啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：canghong</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-58037</link>
		<dc:creator><![CDATA[canghong]]></dc:creator>
		<pubDate>Sat, 10 Dec 2016 01:55:55 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-58037</guid>
		<description><![CDATA[非常有帮助，感谢～ ～]]></description>
		<content:encoded><![CDATA[<p>非常有帮助，感谢～ ～</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：Yanjun</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-57668</link>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
		<pubDate>Wed, 10 Aug 2016 16:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-57668</guid>
		<description><![CDATA[我觉得应该是只分两种组件类型：Spout和Bolt。所有的Spout和Bolt组件都分别具有相同的统一接口，可能存在不同的Spout实现类型，或者不同的Bolt实现类型的组件实例（Task）在同一个Executor，因为Executor不关心具体的Spout或Bolt实现类型，可以参考：
https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L424
或者
https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L604]]></description>
		<content:encoded><![CDATA[<p>我觉得应该是只分两种组件类型：Spout和Bolt。所有的Spout和Bolt组件都分别具有相同的统一接口，可能存在不同的Spout实现类型，或者不同的Bolt实现类型的组件实例（Task）在同一个Executor，因为Executor不关心具体的Spout或Bolt实现类型，可以参考：<br />
<a href="https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L424" rel="nofollow">https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L424</a><br />
或者<br />
<a href="https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L604" rel="nofollow">https://github.com/apache/storm/blob/0.9.x-branch/storm-core/src/clj/backtype/storm/daemon/executor.clj#L604</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：羊肉片</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-57665</link>
		<dc:creator><![CDATA[羊肉片]]></dc:creator>
		<pubDate>Wed, 10 Aug 2016 07:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-57665</guid>
		<description><![CDATA[写的不错，受益很多。有个问题问下，
“
1 个 Spout Task 和 1 个 Bolt Task 在同一个 Executor 中
2 个 Bolt Task 在同一个 Executor 中
”

一个executor只能运行一个component的一个或多个task吧？

“An executor is a thread that is spawned by a worker process. It may run one or more tasks for the same component (spout or bolt).”
http://storm.apache.org/releases/0.9.6/Understanding-the-parallelism-of-a-Storm-topology.html]]></description>
		<content:encoded><![CDATA[<p>写的不错，受益很多。有个问题问下，<br />
“<br />
1 个 Spout Task 和 1 个 Bolt Task 在同一个 Executor 中<br />
2 个 Bolt Task 在同一个 Executor 中<br />
”</p>
<p>一个executor只能运行一个component的一个或多个task吧？</p>
<p>“An executor is a thread that is spawned by a worker process. It may run one or more tasks for the same component (spout or bolt).”<br />
<a href="http://storm.apache.org/releases/0.9.6/Understanding-the-parallelism-of-a-Storm-topology.html" rel="nofollow">http://storm.apache.org/releases/0.9.6/Understanding-the-parallelism-of-a-Storm-topology.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：罗国灏</title>
		<link>http://shiyanjun.cn/archives/1472.html#comment-57139</link>
		<dc:creator><![CDATA[罗国灏]]></dc:creator>
		<pubDate>Sat, 05 Mar 2016 16:29:36 +0000</pubDate>
		<guid isPermaLink="false">http://shiyanjun.cn/?p=1472#comment-57139</guid>
		<description><![CDATA[额，是第三点。]]></description>
		<content:encoded><![CDATA[<p>额，是第三点。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
