Some ASP.NET Benchmark data


Some ASP.NET Benchmark data

Published on Sun 13 Jan 2008 11:01 ( 2 years, 2 months ago)
C# ASP.NET

This is just a very simple and rough benchmark test, I use my own desktop computer running Windows XP professional and many process (including the heavy weight Visual Studio 2008) and ASP.NET's development server which comes with Visual Studio. I believe after deploy it on IIS under Windows Server box will archive much better performance.

I use Apache bench to test, the parameter I used is "-n 1000 -c 100", means send 1000 requests and concurrent number is 100.

Quick view of results:

  Test Request per second [#/sec] (mean)
1 Simple aspx view (same as below MVC's view aspx file) 285.71
2 Simple asp.net MVC 232.73
3 ASP.net MVC with another MVC request from inside 174.39
4 ASP.net MVC with a simple user control rendered by RenderUserControl() 218.43
5 ASP.net MVC with a simple user control rendered by user control tag 235.29

Of course a simple .aspx page archive the best performance, MVC add very minimal overhead to it.

Use tag to render user control have almost no overhead ( I believe it has been complied inside, like source level include),  RenderUserControl() have a small overhead.

shinakuma's RenderComponent() have some overhead in performance since he use "ProcessRequest()" which actually initialize a whole server side MVC cycle.  (Java's jsp:include have same heavy weight behavior as I tested before.) If we can find out a better solution to archive a much lighter weight performance it would be great.

Details outputs:

Test #1: Simple aspx view (same as below MVC's view aspx file)

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 1000 -c 100 http://localhost:64701/views/Home/Index.aspx
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        ASP.NET
Server Hostname:        localhost
Server Port:            -835

Document Path:          /views/Home/Index.aspx
Document Length:        1176 bytes

Concurrency Level:      100
Time taken for tests:   3.500000 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      1410000 bytes
HTML transferred:       1176000 bytes
Requests per second:    285.71 [#/sec] (mean)
Time per request:       350.000 [ms] (mean)
Time per request:       3.500 [ms] (mean, across all concurrent requests)
Transfer rate:          393.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.3      0      15
Processing:    78  331  71.5    343     515
Waiting:       78  328  71.2    328     484
Total:         78  331  71.4    343     515

Percentage of the requests served within a certain time (ms)
  50%    343
  66%    343
  75%    343
  80%    343
  90%    406
  95%    468
  98%    484
  99%    484
100%    515 (longest request)

Test #2:  Simple ASP.NET MVC (empty controller, simple asp.net view page with default master page)

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 1000 -c 100 http
://localhost:64701/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        ASP.NET
Server Hostname:        localhost
Server Port:            -835

Document Path:          /
Document Length:        1168 bytes

Concurrency Level:      100
Time taken for tests:   4.296875 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      1402000 bytes
HTML transferred:       1168000 bytes
Requests per second:    232.73 [#/sec] (mean)
Time per request:       429.688 [ms] (mean)
Time per request:       4.297 [ms] (mean, across all concurrent requests)
Transfer rate:          318.60 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.6      0      46
Processing:    62  408  71.4    421     531
Waiting:       62  403  71.1    421     515
Total:         62  408  71.5    421     546

Percentage of the requests served within a certain time (ms)
  50%    421
  66%    437
  75%    437
  80%    437
  90%    453
  95%    468
  98%    484
  99%    500
100%    546 (longest request)

 

Test#3: ASP.NET MVC with another MVC request from inside of the view (refer to RenderComponent in this posts)

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 1000 -c 100 http
://localhost:64701/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        ASP.NET
Server Hostname:        localhost
Server Port:            -835

Document Path:          /
Document Length:        2133 bytes

Concurrency Level:      100
Time taken for tests:   5.734375 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      2367000 bytes
HTML transferred:       2133000 bytes
Requests per second:    174.39 [#/sec] (mean)
Time per request:       573.438 [ms] (mean)
Time per request:       5.734 [ms] (mean, across all concurrent requests)
Transfer rate:          403.01 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   2.9      0      31
Processing:    62  543  96.6    562     640
Waiting:       46  539  96.6    562     640
Total:         62  543  96.7    562     640

Percentage of the requests served within a certain time (ms)
  50%    562
  66%    578
  75%    578
  80%    578
  90%    593
  95%    593
  98%    625
  99%    625
100%    640 (longest request)

Test #4: ASP.NET MVC with a simple user control rendered by html.RenderUserControl() from MVCToolKit

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 1000 -c 100 http
://localhost:64701/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        ASP.NET
Server Hostname:        localhost
Server Port:            -835

Document Path:          /
Document Length:        1212 bytes

Concurrency Level:      100
Time taken for tests:   4.578125 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      1446000 bytes
HTML transferred:       1212000 bytes
Requests per second:    218.43 [#/sec] (mean)
Time per request:       457.813 [ms] (mean)
Time per request:       4.578 [ms] (mean, across all concurrent requests)
Transfer rate:          308.42 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   3.2      0      31
Processing:   140  426  85.3    453     531
Waiting:      109  423  87.7    453     515
Total:        140  427  85.1    453     531

Percentage of the requests served within a certain time (ms)
  50%    453
  66%    468
  75%    468
  80%    468
  90%    484
  95%    484
  98%    500
  99%    500
100%    531 (longest request)

 

Test #5: ASP.NET MVC with same user control rendered by tag

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -n 1000 -c 100 http
://localhost:64701/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        ASP.NET
Server Hostname:        localhost
Server Port:            -835

Document Path:          /
Document Length:        1212 bytes

Concurrency Level:      100
Time taken for tests:   4.250000 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      1446000 bytes
HTML transferred:       1212000 bytes
Requests per second:    235.29 [#/sec] (mean)
Time per request:       425.000 [ms] (mean)
Time per request:       4.250 [ms] (mean, across all concurrent requests)
Transfer rate:          332.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   3.2      0      31
Processing:    78  401  69.5    421     468
Waiting:       78  398  69.5    421     453
Total:         78  401  69.5    421     468

Percentage of the requests served within a certain time (ms)
  50%    421
  66%    421
  75%    437
  80%    437
  90%    437
  95%    437
  98%    453
  99%    453
100%    468 (longest request)


Related posts:


Search related in web:

Custom Search

RSS Feed

One click subscribe this blog in your google reader!

Be social!


Want to say something here? please sign in



Blog posts link to this page
What are friends tweeting?
Tags cloud
Monthly Archives