title: Yarn - How does yarn.scheduler.capacity.root.queue-name.maximum-capacity works?
body: <p>I have 4 queues under the root queue with the following configuration.</p>
  
  <pre><code>|-------------|-----------------|---------------------|-------------------|
  | Queue Name  | Capacity (in %) | Max Capacity (in %) | User Limit Factor |
  |-------------|-----------------|---------------------|-------------------|
  | default     | 10              | 30                  | 10                |
  |-------------|-----------------|---------------------|-------------------|
  | thriftsvr   | 5               | 30                  | 10                |
  |-------------|-----------------|---------------------|-------------------|
  | stream      | 70              | 70                  | 10                |
  |-------------|-----------------|---------------------|-------------------|
  | batch       | 15              | 30                  | 10                |
  |-------------|-----------------|---------------------|-------------------|
  </code></pre>
  
  <p>I have set up capacity by <code>yarn.scheduler.capacity.root.&lt;queue-name&gt;.capacity</code> and max capacity by <code>yarn.scheduler.capacity.root.&lt;queue-name&gt;.maximum-capacity</code> property.</p>
  
  <p>My understanding is, above 2 properties set ABSOLUTE capacity and ABSOLUTE maximum capacity respectively. That means queue stream's 100% is equal to the 70% of cluster's total capacity and it can fill up to 100% of queue's capacity that is also the 70% of cluster's total capacity.</p>
  
  <p>Now, the problem is when queue 'stream' is filled with 66.4% (i.e. when Used Capacity: 66.4% &amp; Absolute Used Capacity: 46.5%) then new jobs are getting in the pending state which is submitted in queue 'stream' by saying "waiting for AM container to be allocated, launched and register with RM".</p>
  
  <p>When I checked queue configuration on yarn UI it shows Configured Max Capacity: 70.0% &amp; Absolute Configured Max Capacity: 70.0% but according to the configuration, queue 'stream' can be filled till Used Capacity: 100% &amp; Absolute Used Capacity: 70%
  <a href="https://i.stack.imgur.com/swEPF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/swEPF.png" alt="enter image description here"></a></p>
  
  <p>Any idea, why new jobs are unable to utilize the queue stream's capacity till 100%?</p>