title: How to maximize WebJob CPU Usage
body: <p>I have an azure storage queue that has over 100,000 queue items on it. The average processing time is about 1 minute to complete each item (as reported in the WebJob dashboard). </p>
  
  <p>I have set the max batch size for my webJob to be 32 like this:</p>
  
  <pre><code>JobHostConfiguration config = new JobHostConfiguration();
  config.Queues.BatchSize = 32;
  
  var host = new JobHost(config);
  // The following code ensures that the WebJob will be running continuously
  host.RunAndBlock();
  </code></pre>
  
  <p>If I set it any higher than 32 the webjob won't start and keeps flipping between (pending restart and starting) so I assume 32 is the max batch size.</p>
  
  <p>However, my app service plan is running with a cool 4% CPU utilization. I have enabled auto-scale based on CPU usage.</p>
  
  <p>What I want to do is figure out how to make the web job do more tasks in parallel so it can start using more of that CPU usage if it needs it and hopefully cause it to auto scale and then process more. What levers can I pull to make my WebJob take better advantage of my App Service Plan instances?</p>