Cook Computing

Laterooms, GC, and Mono

April 28, 2006 Written by Charles Cook

I just noticed a post by Tim Anderson on gives up on Mono which is worth reading if you're thinking about designing something to run on Mono. Laterooms migrated their site from PHP to .NET using Mono on Linux and suffered major memory management problems when they went live, reported in this post on the Mono list. Tim's post has a recent comment by Gavin Hamill of Laterooms which suggests that garbage collection in Mono is not yet at the same level as Microsoft's implementation:

The core cause appears to be Mono's non-existant garbage collection - well I say non-existant - it features the Boehm algorithm which as I understand is intended as a helper for C coders...

...We expected the runtime to compact + optimise this memory use. It did not; whoops. Had we known Mono was so poorly featured in this dept, we surely would have implemented a disk-based cache strategy...

...Including only Boehm in an 'enterprise' product is insane - isn't half the point of higher level languages like C# that you don't need to think about dull issues such as memory management? I thought we left that behind with C...

As it happens I was involved in some discussions last year about whether the .NET part of the application I work on could run on Linux using Mono. Nothing came of this, mainly because it was perceived there were too many unknowns surrounding the use of Mono, for example intellectual property issues. If in some hypothetical scenario we had ported to Linux using Mono then at least we would probably have detected any garbage collection issues during the intensive load testing we perform before going live with a release - some of our tests drive servers at full load for several weeks - if not at the prototyping stage. Gavin Hamill hints that their performance testing was maybe not as extensive as it should have been:

Functional testing went well (as did the limited performance testing) and live-day came.

At least they were able to move to Windows and .NET without too much trouble.