Benchmarking MVC6 Beta 8

I have always been curious how fast MVC can be, and a previous article (http://blog.bitdiff.com/2012/06/performance-comparison-iis-75-and-iis-8.html) detailed the Web API  speeds with IIS 7.5 to IIS 8 along with self-hosted options. So I spun up a MVC 6 web  app with Beta-8 and used the Apache BenchMark to test it out. Running a i7-3740QM CPU with Windows 7.

My controller contained only this,

[csharp]

[Route("api/[controller]")]
public class ValuesController : Controller
{
// GET: api/values
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
}

[/csharp]

I fired up Apache Benchmark using the command below.

[code]ab -n 1000 -c 2 http://localhost:5000/api/Values [/code]

3.064MS! It beats out the 17.818 from Windows 8 Self Host and I am running Windows 7! This is a localhost call, so adding in SSL or a network would likely increase this. but it helps if it starts really low first.

The first “Time per request” is for each request * concurrent request number. The second “Time per request” is the actual individual requests. Wonderfully explained at this ServerFault question http://serverfault.com/questions/274252/apache-ab-please-explain-the-output

mvc6-beta8-batch1

For giggles, I pumped it up to 10,000 concurrent requests, I also tried 5,000 concurrent requests and got the same ~7ms response time.

mvc6-beta8-crazyconcurrent

So basically MVC6 is FAST! VS2015 diagnostic session for those who wanted to take a peek. I might have had around 100 chrome tabs open when running this benchmark.

 

 

vs2015 diagnostic session

 

Leave a Reply

Your email address will not be published. Required fields are marked *