[Mono-list] Mono performance on Windows vs. Linux

Paolo Molaro lupus@ximian.com
Sun, 21 Mar 2004 16:53:24 +0100

On 03/19/04 Jim Hugunin wrote:
> I'm trying to benchmark a .NET application I wrote (IronPython) under mono.
> I've developed the program completely under windows xp so far.  I've
> installed mono (0.31) on windows and my application runs on it but the


> performance is not as good as I had hoped for.  The benchmark doesn't do any
> I/O or gui work and is processor and memory bound (it's the pystone
> benchmark program).
> Before I invest the time to setup my machine to dual-boot into linux, I
> wanted to ask for some advice.  Should I expect mono to run substantially
> faster under linux for processor and memory bound programs?  Are there any
> obvious tricks I should be using to get the top performance out of mono?
> I've tried running with -O=all but that makes no difference I can see.

If by memory bound you mean you allocate many objects, then you may see
an improvement on Linux: in my tests the Boehm GC we use performed about
20-30 % better on Linux than on windows. I'm sure, though, you were
hoping for a greater speedup:-)
We should be able to improve object creation somewhat in the next few
months, but don't expect 2x-3x speedups until we change to a
generational collector.
That said, there are many areas in Mono which we didn't optimize yet,
mostly for lack of time or for lack of people complaining about them.
There are also some issues with a few features: for example if ICU
support is compiled in, several string operations have a big slowdown.
We'd need more data from you to try and fix the performance issues.
You can either produce some profiling data and send that (run with mono
--profile and save the output to a file) or send us the program
with instructions on how to repoduce the results so that we can
collect the profiling data ourselves and we can measure the effects of
speedups we may implement (of course, source would be even better, but
should not be required: if you generate code at runtime with
Reflection.Emit maybe you can make it save the assembly and send of that
and any python runtime assembly it may need to run).
We're very interested in fixing the performance issues as we move
towards mono 1.0, so it would be good if you could help us making mono
run your program better.


lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better