在测试中为 hdfs map reduce 可以设置多低的 Yarn 容器内存?
How low can Yarn container memory be set for hdfs map reduce in test?
我正在设置一个 hadoop 单节点环境,用于在只有 4GB 物理内存的硬件上进行测试,并使用 hadoop 2.6.0。
我只使用了针对此类环境建议的基本配置。但我现在担心我可能应该调整内存资源管理以便能够 运行 一些 map reduce 示例。
我知道有几个设置需要查看,包括 java 堆以及映射和缩减任务的内存。对于像我这样的小规模测试环境,我为适度的 map reduce 任务设置的最小、最大容器大小有多低?
我特别指的是:
yarn.scheduler.minimum-allocation-mb
yarn.scheduler.maximum-allocation-mb
启动-dfs 和启动-yarn 后,机器上的可用物理空间远低于 1 GB。
我经常在 VM 上工作,我的 yarn 中有这些设置-site.xml:
<property>
<description>Max available memory on each data node.</description>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>4096</value>
</property>
<property>
<description>Max available cores data node.</description>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>8</value>
</property>
<property>
<description>Minimum allocation unit.</description>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>256</value>
</property>
<property>
<description>Max allocation unit.</description>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>4096</value>
</property>
<property>
<description>Minimum increment setting - set to same as min-allocation</description>
<name>yarn.scheduler.increment-allocation-mb</name>
<value>256</value>
</property>
这在 mapred-site.xml -
<!-- small cluster memory settings -->
<property>
<name>mapreduce.map.memory.mb</name>
<value>256</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>256</value>
</property>
<property>
<description>Application master allocation</description>
<name>yarn.app.mapreduce.am.resource.mb</name>
<value>256</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx204m</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx204m</value>
</property>
<property>
<description>Application Master JVM opts</description>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Xmx204m</value>
</property>
<property>
<name>mapreduce.task.io.sort.mb</name>
<value>50</value>
</property>
我发现这些设置对我 运行 在我的 VM 上使用 Vm 大小的数据量(即,不太大!)的任何东西都非常有效。
我正在设置一个 hadoop 单节点环境,用于在只有 4GB 物理内存的硬件上进行测试,并使用 hadoop 2.6.0。
我只使用了针对此类环境建议的基本配置。但我现在担心我可能应该调整内存资源管理以便能够 运行 一些 map reduce 示例。
我知道有几个设置需要查看,包括 java 堆以及映射和缩减任务的内存。对于像我这样的小规模测试环境,我为适度的 map reduce 任务设置的最小、最大容器大小有多低?
我特别指的是:
yarn.scheduler.minimum-allocation-mb
yarn.scheduler.maximum-allocation-mb
启动-dfs 和启动-yarn 后,机器上的可用物理空间远低于 1 GB。
我经常在 VM 上工作,我的 yarn 中有这些设置-site.xml:
<property>
<description>Max available memory on each data node.</description>
<name>yarn.nodemanager.resource.memory-mb</name>
<value>4096</value>
</property>
<property>
<description>Max available cores data node.</description>
<name>yarn.nodemanager.resource.cpu-vcores</name>
<value>8</value>
</property>
<property>
<description>Minimum allocation unit.</description>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>256</value>
</property>
<property>
<description>Max allocation unit.</description>
<name>yarn.scheduler.maximum-allocation-mb</name>
<value>4096</value>
</property>
<property>
<description>Minimum increment setting - set to same as min-allocation</description>
<name>yarn.scheduler.increment-allocation-mb</name>
<value>256</value>
</property>
这在 mapred-site.xml -
<!-- small cluster memory settings -->
<property>
<name>mapreduce.map.memory.mb</name>
<value>256</value>
</property>
<property>
<name>mapreduce.reduce.memory.mb</name>
<value>256</value>
</property>
<property>
<description>Application master allocation</description>
<name>yarn.app.mapreduce.am.resource.mb</name>
<value>256</value>
</property>
<property>
<name>mapreduce.map.java.opts</name>
<value>-Xmx204m</value>
</property>
<property>
<name>mapreduce.reduce.java.opts</name>
<value>-Xmx204m</value>
</property>
<property>
<description>Application Master JVM opts</description>
<name>yarn.app.mapreduce.am.command-opts</name>
<value>-Xmx204m</value>
</property>
<property>
<name>mapreduce.task.io.sort.mb</name>
<value>50</value>
</property>
我发现这些设置对我 运行 在我的 VM 上使用 Vm 大小的数据量(即,不太大!)的任何东西都非常有效。