title: How to make Hadoop/EMR use more containers per node
body: <p>I'm in the process of moving our application from Hadoop 1.0.3 to 2.7, on EMR v5.1.0. I got it running, but I'm still having problems getting my head around the resource-allocation system in Yarn. With the default settings provided by EMR, Hadoop only allocates one container per node, even if I select a larger instance type for the nodes. This is a problem, since we'll now be using twice as many nodes to do the same amount of work.</p>
  
  <p>I want to squeeze more containers into one node, <em>and</em> ensure that we're using all the available resources. I assume that I shouldn't touch <code>yarn.nodemanager.resource.memory-mb</code> or  <code>yarn.nodemanager.resource.cpu-vcores</code>, since those are set by EMR to reflect the actual available resources. Which settings do I have to change?</p>