如何告诉 hadoop 为单个映射器作业分配多少内存?
我创建了一个 Elastic MapReduce 作业,并且正在尝试优化其性能。
目前我正在尝试增加每个实例的映射器数量。我通过 mapred.tasktracker.map.tasks.maximum=X 执行此操作
elastic-mapreduce --create --alive --num-instance 3 \
--bootstrap-action s3://elasticmapreduce/bootstrap-actions/configure-hadoop \
--args -s,mapred.tasktracker.map.tasks.maximum=5
每次我尝试将每个小实例设置 X 大于 2 时,初始化都会失败,从中我得出结论,hadoop 为每个映射任务分配了 800m 的内存。对我来说这似乎太过分了。我希望它是 400m 的顶部。
如何告诉 hadoop 在每个映射任务中使用更少的内存?
I've created a Elastic MapReduce job, and I'm trying to optimize its performance.
At this moment I'm trying to increase the number of mappers per instance. I am doing this via mapred.tasktracker.map.tasks.maximum=X
elastic-mapreduce --create --alive --num-instance 3 \
--bootstrap-action s3://elasticmapreduce/bootstrap-actions/configure-hadoop \
--args -s,mapred.tasktracker.map.tasks.maximum=5
Each time I try to set X over 2 per small instance, the initialization fails, from which I conclude, that hadoop allocated 800m of memory per map task. To me that seems too excessive. I'd like it to be 400m tops.
How do I tell hadoop to use less memory for each map task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 mapred.child.java.opts 属性。默认为 -Xmx200m,这意味着每个 Map/Reduce 任务需要 200MB 的堆。
看起来 EC2 Small 具有 1.7 GB 内存。这是 TaskTracker 节点上 Hadoop 进程默认设置的内存。感谢“Hadoop:权威指南”
Datanode 1,000 MB
任务跟踪器 1,000 MB
Tasktracker 子映射任务 400 MB (2 * 200 MB)
Tasktracker 子映射任务 400 MB (2 * 200 MB)
总计 2,800 MB。
最重要的是操作系统内存。选择更好的配置或更改默认设置。仅供参考,这是建议 不同节点的硬件配置。
Check the mapred.child.java.opts property. It's defaulted to -Xmx200m, which means 200MB of heap for each of the map/reduce task.
Looks like EC2 small has 1.7 GB memory. Here is the memory with the default settings by the Hadoop processes on the TaskTracker node. Thanks to "Hadoop : The Definitive Guide"
Datanode 1,000 MB
Tasktracker 1,000 MB
Tasktracker child map task 400 MB (2 * 200 MB)
Tasktracker child map task 400 MB (2 * 200 MB)
Total's to 2,800MB.
On top of this, there is the OS memory. Either pickup a nicer configuration or change the default settings. FYI, here is the recommendation on the H/W configuration for the different nodes.