title: Azure Cloud Service Performance
body: <p>I have an Azure Cloud Service that hosts a website that generates PDF files. The PDF files can vary in size up to around 10MB. Its a .NET MVC Entity Framework site that uses PDFSharp/Migradoc to generate the PDFs.</p>
  
  <p>I've been trying to improve the performance of the PDF generation and I've found that even when increasing the instance size - for example from A2 to A4 - I see little change in performance.</p>
  
  <p>I checked the monitor in the portal and it doesn't show a very high usage, and I also checked the Resource Monitor on one of the Cloud Service servers and the memory usage was at most 50% usage.</p>
  
  <p>Azure Portal Monitor:</p>
  
  <p><a href="https://i.stack.imgur.com/bmxoH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bmxoH.png" alt="Azure Portal Monitor"></a></p>
  
  <p>Resource Monitor:</p>
  
  <p><a href="https://i.stack.imgur.com/63EcL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/63EcL.png" alt="Resource Monitor"></a></p>
  
  <p>Note: the memory usage is at 50%, CPU usage is low and most of the network usage displayed seems to be from the remote desktop connection.</p>
  
  <p>I imagine the slowness is either due to slow disc write speed or long garbage collection intervals but I'm not sure how to prove this.</p>
  
  <p>I'd greatly appreciate any pointers or ideas that can help me to improve the performance. I can also upgrade the instance size to one of the newer instances (D/D2 series) if you think a faster SD drive or CPU will help, but since the CPU usage is so low I'm not sure if that would help.</p>
  
  <p>Thanks!</p>