nav-left cat-right

Code Camp

I hate airplanes. They need to reorganize the layout of planes into First Class, Business, Coach, and Contagious. Walking disease vectors can have their own little self contained universe in the plane, cut off from recycling their plagues into our breathing space. Can you tell I'm sick? Well, at least it happened at the end of my vacation.

Regardless of my sore throat, I lurched my way to Victoria Code Camp yesterday. It was a great event, many kudos to the organizers. One of the best talks of the day was from Richard Campbell of Strangeloop Networks on the scalability and load testing of ASP.Net applications. Even though I was familiar with most of the metrics Richard talked about, you always gain insight from listening to experts pontificate on their areas of specialty. I was fascinated by the Performance Equation that he presented (taken from the book "Field Guide to Application Delivery Systems" by Peter Sevcik and Rebecca Wetzel). Here it is:

R ~= Payload/Bandwidth + (RTT + AppTurns(RTT))/Concurrent Requests + Cs + Cc


R = Response Time
RTT = Round Trip Time
AppTurns = # of HTTP Requests
Concurrent Requests = # server sockets opened by the browser
Cs = Server side compute time
Cc = Client Compute Time

Basically what this shows is that as you scale up an application, given adequate bandwidth and a constant client computation time of your pages, server code becomes a larger and larger performance factor. But until you're dealing with hundreds of requests a second? Get the rest under control! Wise words IMHO.

Aside from the above nerdsplosion, I took much more away from Richard's talks. It was clear that he had dealt with many clients who had given up on ASP.Net as not being able to meet the same performance milestones as other solutions. He mentioned PHP specifically, along with J2EE and WebSphere, as things that his clients had told him they wanted to migrate to because of ASP.Net's poor performance. And Richard thus spake to his clients:

"Microsoft configured ASP.Net for ease of application development out of the box. Microsoft did not configure ASP.Net for fastest performance out of the box. That doesn't mean it isn't performant!"

I can't stress how important a point this is. The more you let the ASP.Net pipeline coddle your development along, the more overhead it is doing for you on every web request. This is fine for small sites, but when you hit the big time, you need to know about caching, deadlocks, session storage, garbage collection, and how your worker processes recycle. I've seen people recompile PHP from source to take out one compile option to increase their web performance by 1%. ASP.Net is just as configurable, it can run just as fast, and it can do the job in a managed environment that you have full control over. Just like anything else, you simply need to know how to do it.

Incidentally, Richard got IIS on his laptop up to 600 requests per second under load, and it was happy as a clam. He's apparently personally pushed IIS Servers to 1000 requests per second in production environments.

I'll be getting back to my website project this week and am anxious to try out some of Richard's suggested tools and techniques. And of course blogging about it. We should have some interesting mono and performance related posts coming up soon.

Be Sociable, Share!

2 Responses to “Code Camp”

  1. blake says:

    Performant isn't even a word! Well, ok, it is a word, but it means "a performer". You cromulent verbers really embiggen me.

    Despite the wordsmithing, this is definitely a good point about performance. I have always compiled PHP from source just so that I could remove a lot of the modules that I don't need. Because every apache thread will initialize its own instance of PHP, you can save a lot of memory by compiling out the junk you don't use. It is quite often the case that taking an environment or platform of any kind out of the box will result in good compatibility, but sub-optimal performance.

    It would be interesting to see a list of what tweaks Richard did to IIS to get his performance up.

  2. theY4Kman says:

    Yes, I've been working with PHP for most of my developmental career, and I've strived to make my servers work as fast and as efficient as possible. However, I've only just begun working with ASP.NET, and I don't know nearly as much about performance for it as PHP. I'd love to know some of Richard's tweaks.

    Oh, and a big difference between ASP.NET and PHP is that you can get PHP's source. No matter what you do with ASP.NET, you'll always have the same binaries.

    I don't mean to be callous or condescending in this post. Just a disclaimer :)

Leave a Reply