Storm 调优是非常重要的, 仅次于写出正确的代码, 好在Storm官网上有关于worker executors tasks的介绍, http://storm.incubator.apache.org/documentation/Understanding-the-parallelism-of-a-Storm-topology.html

这篇文章是收录自这个blog: http://www.michael-noll.com/blog/2012/10/16/understanding-the-parallelism-of-a-storm-topology/

将此翻译一下, 加强一下认识:

What makes a running topology: worker processes, executors and tasks

worker process executes a subset of a topology, and runs in its own JVM. A worker process belongs to a specific topology and may run one or more executors for one or more components (spouts or bolts) of this topology. A running topology consists of many such processes running on many machines within a Storm cluster.

An executor is a thread that is spawned by a worker process and runs within the worker’s JVM. An executor may run one or more tasks for the same component (spout or bolt). An executor always has one thread that it uses for all of its tasks, which means that tasks run serially on an executor.

一个worker进程负责执行一个Topology的子集, 有自己独立的JVM, 一个worker进程属于一个特定的Topology, 运行着一到多个storm的组件(spouts或者bolts)的线程executors.一个运行中的Topology包含许多这样的进程, 分布在storm集群的不同的物理机器上.
一个executors是一个由worker进行产生, 并运行在worker JVM的线程. 一个executor 可能跑着同一个storm组件(spout或者bolt)的一个或者多个tasks, 一个executor 总是只有一个线程用于执行当前任务, 也就意味着executor中的任务是串行的.

task performs the actual data processing and is run within its parent executor’s thread of execution. Each spout or bolt that you implement in your code executes as many tasks across the cluster. The number of tasks for a component is always the same throughout the lifetime of a topology, but the number of executors (threads) for a component can change over time. This means that the following condition holds true: #threads <= #tasks. By default, the number of tasks is set to be the same as the number of executors, i.e. Storm will run one task per thread (which is usually what you want anyways).

Also be aware that:

  • The number of executor threads can be changed after the topology has been started (see storm rebalance command below).
  • The number of tasks of a topology is static.

See Understanding the Internal Message Buffers of Storm for another view on the various threads that are running within the lifetime of a worker process and its associated executors and tasks.

一个task用于处理数据和执行, 每一个spout或者bolt都在集群上有许多tasks, 一个组件中task的数目总是跟这个Topology的吞吐量相同, 但是executors(threads)的数目是可以动态调整的. 这就意味着 threads<=tasks. 默认情况下, tasks=threads, storm将会为每一个task分配一个executor, 这也是用户想要的情况

注意:

1. executors threads的数目是可以在Topology启动后变动(storm rebanlance)

2. Topology的tasks数据是静态的.

可通过这篇blog Understanding the Internal Message Buffers of Storm 从另一个角度来看worker executors tasks, 稍后翻译

To be continued...

Storm worker 并行度等理解的更多相关文章

  1. storm源码之理解Storm中Worker、Executor、Task关系 + 并发度详解

    本文导读: 1 Worker.Executor.task详解 2 配置拓扑的并发度 3 拓扑示例 4 动态配置拓扑并发度 Worker.Executor.Task详解: Storm在集群上运行一个To ...

  2. Storm概念学习系列之并行度与如何提高storm的并行度

    不多说,直接上干货! 对于storm来说,并行度的概念非常重要!大家一定要好好理解和消化. storm的并行度,可以简单的理解为多线程. 如何提高storm的并行度? storm程序主要由spout和 ...

  3. 【原】【译文】理解storm拓扑并行度

    原文地址: http://storm.apache.org/releases/1.2.1/Understanding-the-parallelism-of-a-Storm-topology.html ...

  4. 【原】storm源码之理解Storm中Worker、Executor、Task关系

    Storm在集群上运行一个Topology时,主要通过以下3个实体来完成Topology的执行工作:1. Worker(进程)2. Executor(线程)3. Task 下图简要描述了这3者之间的关 ...

  5. [Storm] 并发度的理解

    Tasks & executors relation Q1. However I'm a bit confused by the concept of "task". Is ...

  6. Storm中并行度原来是这样计算的(1.0.1版本)

    ==思考问题1== 向集群提交一个拓扑的时候,Storm是如何计算Task数以及Executor数的? 具体有多少个worker,多少个executor,每个executor负责多少个task? == ...

  7. Storm-6 Storm的并行度、Grouping策略以及消息可靠处理机制简介

    概念: 配置并行度 动态的改变并行度 流分组策略----Stream Grouping 消息的可靠处理机制 概念: Workers (JVMs): 在一个节点上可以运行一个或多个独立的JVM 进程.一 ...

  8. Storm的并行度、Grouping策略以及消息可靠处理机制简介

    转自:https://my.oschina.net/zc741520/blog/409949 概念: Workers (JVMs): 在一个节点上可以运行一个或多个独立的JVM 进程.一个Topolo ...

  9. storm的acker机制理解

    转载请注明原创地址http://www.cnblogs.com/dongxiao-yang/p/6142356.html Storm 的拓扑有一些特殊的称为"acker"的任务,这 ...

随机推荐

  1. 性能测试脚本开发(C&C#&Java)

    一.C语言实现及相关问题解决 LR:C函数-功能描述 LR:C函数-适用范围 LR:C函数-头信息传递 LR:C函数-字符串编码转换 lr_convert_string_encoding(" ...

  2. mysql下监测数据库语句creating sort index时间过长的问题

    在一张单表5000W数据上进行数据查询时传入两个单列索引条件,进行组合索引查询时,如果最后有order by id排序,与去除该排序,性能差距接近两个数量级 结论:在使用列的默认排序时,不应该再ord ...

  3. HTTP学习笔记(一)报文和连接管理

    对TCP/IP协议簇有些了解的同学们应该都知道.TCP/IP协议通过精简ISO网络7层协议(事实上了解历史渊源的话,TCP/IP协议本来目的并非简化ISO的7层协议.仅仅是因为ISO协议簇制定速度慢于 ...

  4. Locust压力测试Odoo

    Table of Contents 编写测试任务集 TaskSet 运行 Locust 分布式 运行 master 运行 slave.     Locust 是个伸缩性很好的压力测试框架,OdooLo ...

  5. 3、C++新的关键字

        C++ 添加了一些全新的关键字. 1.new     new 来进行动态内存的分配,而delect 则是进行内存的释放, 申请的方式: 变量申请: int *p = new int; // 申 ...

  6. (十)jQuery对表单、表格的操作

    一.表单应用 1.HTML中的表单大致由三部分组成 (1).表单标签:包含处理表单数据所用的服务端程序URL,以及数据提交到服务器的方法. (2).表单域:包含文本框.密码框.隐藏域.多行文本框.复选 ...

  7. C语言批量数据到动态二维数组

    上一篇文章将文件读取放到静态创建的二维数组中,可是结合网络上感觉到今天的DT时代,这样批量大量读取一个上百行的数据,分配的内存是否可能由于大量的数据而产生溢出呢,近期一直研究里malloc函数.通过它 ...

  8. 产生N个不重复的随机数的快速算法

    //seed array ,,,,,,,,,}; //随机数个数 ; //结果存放在里面 ]; ; i < N; i++) { //从剩下的随机数里生成 , startArray.length ...

  9. 有两个好友A和B,住在一片长有蘑菇的由n*m个方格组成的草地,A在(1,1),B在(n,m)。现在A想要拜访B,由于她只想去B的家,所以每次她只会走(i,j+1)或(i+1,j)这样的路线,在草地上有k个蘑菇种在格子里(多个蘑菇可能在同一方格),问:A如果每一步随机选择的话(若她在边界上,则只有一种选择),那么她不碰到蘑菇走到B的家的概率是多少?

    第二种方法:首先分析题意,可用概率的方法来计算,做了好几道百度的题目,觉得大多数是再考概率论,所以首先要弄懂题意,最后做题前把公式写出来,这样编码时才能游刃有余. 本题中下面的第一种用迭代枚举的方法来 ...

  10. CentOS 配置网络

    1.编辑ifcfg-eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 2.修改NOBOOT=yes 3.重启服务 service network re ...