I am setting up a development server and want to set it up to serve ASP.NET pages using Mono. I am planning on using Cherokee and Mono (http://www.cherokee-project.com/doc/cookbook_mono.html) and wondered if anyone had done any performance testing comparing the Unix based stack to the Windows based.
When testing Mono/Linux vs .NET/Windows workloads, you have to remember that there is more at play than just the runtime environment.
There are areas in which Linux performs better than Windows (Most IO and network operations tend to be faster for comparable C programs). At the same time, .NET has a more advanced garbage collector and a more advanced JIT compiler.
When it comes to the class libraries, it really depends on what code paths you are using. As JacksonH said on a previous post, you can hit code paths that have been optimized in one implementation, but not on the other, and viceversa.
On ASP.NET workloads you have to remember that the default setup will route all incoming requests to a single "worker" process, mod_mono and Cherokee use a similar approach:
At least with Apache we support a mechanism where you can divide application workloads across multiple workers, which helps under high loads as it avoids any in-process locking and gives each worker a whole thread pool to work from:
The details on how to configure this setup are available here:
This is kinda a non-answer. However there isn't a real answer here. Unfortunately this thing is highly application-dependent. Your app could hit on something that Mono happens to do really well or you might be heavily using something that is implemented poorly or has some bugs. It's not really a case of Mono being X times slower/faster than IIS.
My suggestion is to take your app, deploy it on two different EC2 instances (one Windows and one Mono) and do your testing there. If you find major issues on the Mono instance, please report them and we'll try to get things improved.
All that being said, I can tell you from personal experience that Mono aspx does perform really well.