[Mono-dev] Fundamental performance problems with Mono
kumpera at gmail.com
Thu Jan 7 13:16:46 EST 2010
Providing a simple benchmark program that highlight the limitation in mono's
implementation would help a lot.
Our generational GC is evolving quite fast and you can try it now to see how
under your program. Build instructions can be found on the list history.
Besides that, feel free to contribute improvements in that area, we would
love some patches
for that. ;)
On Thu, Jan 7, 2010 at 1:37 PM, zvikag <zvika at liboxmail.com> wrote:
> Hello all,
> The bottom line of this message is that I don't see how can one write a
> high-performance socket server in Mono...
> Here is the story:
> I am writing a proxy server using .NET Socket API. This proxy does almost
> entirely I/O work - copying buffers from one socket to another. Now, Mono
> doesn't implement the newer
> XXXAsync Socket API that was introduced in .NET 2.0 SP1 (or more
> accurately, implements it
> perfunctorily ). So I was left to use the APM Socket API which produces
> of garbage objects under heavy load.
> When testing the server on Linux under load we saw very frequent CPU bursts
> that crippled the throughput of the server. After profiling with the mono
> built-in profiler I confirmed that the reason for the high CPU usage was
> GC collections that got more and more frequent and took more and more time.
> I then read a little bit and realized that the Mono GC is non-generational
> which might explain the long GC cycles (if it was generational it could
> collected the garbage objects that were created during async socket
> operations in generation 0 and probably stop there, but it has to traverse
> the entire managed heap).
> So the combination of the non-generational GC and the unimplemented
> Socket API result in very poor performance of the Mono server. The maximum
> throughput of the server with Mono on Linux is about half of that on
> using .NET.
> I attached the GC stats and profiling results of a 15 minute run.
> http://old.nabble.com/file/p27026906/profile_alloc.log profile_alloc.log
> http://old.nabble.com/file/p27026906/gc_stats.log gc_stats.log
> Can you help me out here?
> View this message in context:
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list