Storm worker 并行度等理解
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
A 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中的任务是串行的.
A 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 并行度等理解的更多相关文章
- storm源码之理解Storm中Worker、Executor、Task关系 + 并发度详解
本文导读: 1 Worker.Executor.task详解 2 配置拓扑的并发度 3 拓扑示例 4 动态配置拓扑并发度 Worker.Executor.Task详解: Storm在集群上运行一个To ...
- Storm概念学习系列之并行度与如何提高storm的并行度
不多说,直接上干货! 对于storm来说,并行度的概念非常重要!大家一定要好好理解和消化. storm的并行度,可以简单的理解为多线程. 如何提高storm的并行度? storm程序主要由spout和 ...
- 【原】【译文】理解storm拓扑并行度
原文地址: http://storm.apache.org/releases/1.2.1/Understanding-the-parallelism-of-a-Storm-topology.html ...
- 【原】storm源码之理解Storm中Worker、Executor、Task关系
Storm在集群上运行一个Topology时,主要通过以下3个实体来完成Topology的执行工作:1. Worker(进程)2. Executor(线程)3. Task 下图简要描述了这3者之间的关 ...
- [Storm] 并发度的理解
Tasks & executors relation Q1. However I'm a bit confused by the concept of "task". Is ...
- Storm中并行度原来是这样计算的(1.0.1版本)
==思考问题1== 向集群提交一个拓扑的时候,Storm是如何计算Task数以及Executor数的? 具体有多少个worker,多少个executor,每个executor负责多少个task? == ...
- Storm-6 Storm的并行度、Grouping策略以及消息可靠处理机制简介
概念: 配置并行度 动态的改变并行度 流分组策略----Stream Grouping 消息的可靠处理机制 概念: Workers (JVMs): 在一个节点上可以运行一个或多个独立的JVM 进程.一 ...
- Storm的并行度、Grouping策略以及消息可靠处理机制简介
转自:https://my.oschina.net/zc741520/blog/409949 概念: Workers (JVMs): 在一个节点上可以运行一个或多个独立的JVM 进程.一个Topolo ...
- storm的acker机制理解
转载请注明原创地址http://www.cnblogs.com/dongxiao-yang/p/6142356.html Storm 的拓扑有一些特殊的称为"acker"的任务,这 ...
随机推荐
- Oracle内存管理(之五)
[深入解析--eygle]学习笔记 1.4. 2其它内存组件 Large Pool-大池是SGA的一个可选组件,通经常使用于共享server模式(MTS). 并行计算或 RMAN的备份恢复等操作. J ...
- 手机APP脚本录制(LoadRunner 12)
最近因项目需要,研究了下手机APP脚本录制方法,有需要的童鞋可参考使用! 方法1: 在手机网络中设置网络代理,使用LR12选择Mobile Application – HTTP/HTML协议中代理录制 ...
- ThinkPHP 3.1、3.2一个通用的漏洞分析
Author:m3d1t10n 前两天看到phithon大大在乌云发的关于ThinkPHP的漏洞,想看看是什么原因造成的.可惜还没有公开,于是就自己回来分析了一下. 0x00官方补丁(DB.class ...
- make -j 4 echo !$
make -j 4 #以cpu四核编译 !$上一次命令空格后的部分
- 微信小程序-封装请求(GET、POST)
使用:先导入到util.js 最后在页面上导入util.js(路径自改) var util = require('../../util.js'); 使用示例GET:util.SEND(url,'GET ...
- Amazon DynamoDB, 面向互联网应用的高性能、可扩展的NoSQL数据库
DynamoDB是一款全面托管的NoSQL数据库服务.客户能够很easy地使用DynamoDB的服务.同一时候享受到高性能,海量扩展性和数据的持久性保护. DynamoDB数据库是Amazon在201 ...
- 应用程序之UITableView的Plain用法和cell缓存池优化
效果展示 过程分析 代码实现 cell缓存池优化 一.效果展示 二.过程分析 首先通过三步创建数据,展示数据 监听选中某一个cell时调用的方法 在cell中创建一个对话框 修改对话框中的值,并且重新 ...
- Java 实现对Sql语句解析
原文地址:http://www.cnblogs.com/zcftech/archive/2013/06/10/3131286.html 最近要实现一个简易的数据库系统,除了要考虑如何高效的存储和访问数 ...
- Selenium详解
自动化测试工具,支持多种浏览器.爬虫中主要用来解决JavaScript渲染的问题. 主要是操控流量器,让浏览器做一些点击啊.加载渲染js啊,之类的.
- Redis(十):使用RedisTemplate执行Redis脚本
对于Redis脚本使用过的同学都知道,这个主要是为了防止竞态条件而用的.因为脚本是顺序执行的.(不用担心效率问题)比如我在工作用,用来设置考试最高分. 如果还没有用过的话,先去看Redis脚本的介绍, ...