title: .NET Service - Analysing Development vs Test performance
body: <p>I have a .NET REST API written using C# MVC5.</p>
  
  <p>The API uses repository that fire hoses necessary data from database, then analyses it and transforms into usable model. The transformation uses a lot of linq to model the data.</p>
  
  <p>On dev (Windows 10), i7 8 core @ 3.7ghz, 32gb ram. it takes 10 secs for large test range.</p>
  
  <p>Running on a VM (Windows 2008R2) virtual xeon with 8 virtual  cores @ 2.99ghz, 8GB RAM takes 300 seconds (5 mins).</p>
  
  <p>Neither exhaust memory, and neither are CPU-bound (CPU touches 50% on the VM, and barely noticed on dev box.)</p>
  
  <p>Same database, code etc.  </p>
  
  <p>The API makes use of async api to load some peripheral data whilst it's doing primary job, so I could put some logs in to log time I guess.</p>
  
  <p>What are the common techniques for tackling this problem? Can the CPU speed really be making that much difference?</p>
  
  <p>thanks</p>
  
  <p>EDIT: 
  FOllowing comment by Pieter, I've increased the VM's memory to 12GB and monitored the performance of the VM whilst executing the operation. It's not the best visual aid (screen shot of TM end of op), but what it did show what that the vCPUs never really went above ~60% and memory - apart from a few mb at beginning of request, never went above 2.7GB.</p>
  
  <p><a href="https://i.stack.imgur.com/KILu0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KILu0.png" alt="enter image description here"></a></p>
  
  <p>If IIS / .NET / my operation is not maxing out the resources, what is taking so long? </p>