views:

1243

answers:

5

I'm quickly falling in love with ASP.NET MVC beta, and one of the things I've decided I won't sacrifice in deploying to my IIS 6 hosting environment is the extensionless URL. Therefore, I'm weighing the consideration of adding a wildcard mapping, but everything I read suggests a potential performance hit when using this method. However, I can't find any actual benchmarks!

The first part of this question is, do you know where I might find such benchmarks, or is it just an untested assumption?

The second part of the question is in regards to the 2 load tests I ran using jMeter on our dev server over a 100Mbs connection.

Background Info

Our hosting provider has a 4Gbs burstable internet pipe with a 1Gbs backbone for our VLAN, so anything I can produce over the office lan should translate well to the hosting environment.

The test scenario was to load several images / css files, since the supposed performance hit comes when requesting files that are now being passed through the ASP.NET ISAPI filter that would not normally pass through it. Each test contained 50 threads (simulated users) running the request script for 1000 iterations each. The results for each test are posted below.

Test Results

Without wildcard mapping:

Samples: 50,000
Average response time: 428ms
Number of errors: 0
Requests per second: 110.1
Kilobytes per second: 11,543

With wildcard mapping:

Samples: 50,000
Average response time: 429ms
Number of errors: 0
Requests per second: 109.9
Kilobytes per second: 11,534

Both tests were run warm (everything was in memory, no initial load bias), and from my perspective, performance was about even. CPU usage was approximately 60% for the duration of both tests, memory was fine, and network utilization held steady around 90-95%.

Is this sufficient proof that wildcard mappings that pass through the ASP.NET filter for ALL content don't really affect performance, or am I missing something?

Edit: 11 hours and not a single comment? I was hoping for more.. lol

+1  A: 

I was looking for benchmark like this for a long time. Thanx!

In my company we did wildcard mapping on several web sites (standard web forms, .net1.1 and 2, iis6), and sys admins said to me that they didn't noticed any performance issues.

But, it seems you stressed network, not server. So maybe the scores are so similar because network bottleneck? Just thinking...

Hrvoje
+3  A: 

I think there are several additional things to check:

  • Since we're using the .Net ISAPI filter, we might be using threads used to run application for serving static assets. I would run the same load test while reviewing performance counters of threads - Review this link
  • I would run the same load test while running Microsoft Performance Analyzer and compare the reports.
joeysim
+6  A: 

Chris, very handy post.

Many who suggest a performance disadvantage infer that the code processed in a web application is some how different/inferior to code processed in the standard workflow. The base code type maybe different, and sure you'll be needing the MSIL interpreter, but MS has shown in many cases you'll actually see a performance increase in a .NET runtime over a native one.

It's also wise to consider how IIS has to be a "jack of all trades" - allowing all sorts of configuration and overrides even on static files. Some of those are designed for performance increase (caching, compression) and - indeed - will be lost unless you reimplement them in your code, but many of them are for other purposes and may not ever be used. If you build for your needs (only) you can ignore those other pieces and should be realising some kind of performance advantage, even though there's a potential ASP.NET disadvantage.

In my (non-.NET) MVC testing I'm seeing considerable (10x or more) performance benefits over webforms. Even if there was a small hit on the static content - that wouldn't be a tough pill to swallow.

I'm not surprised the difference is almost negligible in your tests, but I'm happy to see it backed up.

NOTE: You can disable wildcard mapping from static directories (I keep all static files in /static/(pics|styles|...)) in IIS. Switch the folder to an application, remove the wildcard mapping, and switch it back from an application and - voilà - static files are handled by IIS without pestering your ASP.NET.

Rudu
A: 

That's quite an impressive post there, thanks very much for that.

We're also assessing the security and performance concerns with removing a piece of software that's always been in place to filter out unwanted traffic.

Will there by any further benchmarking on your part?

Cheers,

Karl.

A: 

Hi, how did force unique url's to prevent pages from just being returned from cache?

Thanks jP