GC-(in)capability

Marek Paska <[email protected]> Mon, 6 Sep 2004 00:08:53 +0200
Newsgroups gmane.comp.gnome.mono.garbage-collection
Message-ID <[email protected]>
Hi Mono hackers!

Since a beginning I am very interested in C# and .Net technology. Therefore I am
also very interested in Mono. I think it&#8217;s a nice piece of SW that will bring
many quality applications to Linux. But:

I am deeply disappointed by poor performance (or better capability) of Mono's
GC. I've written a program for indexing FTP servers and searching its files by
name. It uses inverted files as indexes and it is designed for millions of
filenames and "nearly real time" answers of users' queries.

Under MS .Net Framework 1.1 it works perfectly. I would like to run it on Linux.
But under Mono I am not able to create index from crawled data. The problem is
caused by memory fragmentation. While work-space of my application (during my
index build) stays constant (150 MB), the space allocated in virtual memory
grows all the time until it eats all the swap space (1 GB) and is killed by
kernel. (Or I receive message "GC warning -> returning null" (On Linux) or "Too
many heap sections" (under Win).)

I guess the fact that Mono uses GC algorithm that doesn't perform heap
compaction (and therefore allows fragmentation) is a big mistake. And absence of
stop-the-world-pauses is not sufficient argument for me. For my application (and
many other common) the GC-pauses are not very harmless. Otherwise applications
that must be really real-time are not very common. If you want to say that it&#8217;s
C++ approach and C++ programs do not suffer by fragmentation, then I say that
IMHO Java/C# programming style is slightly different and produces much more
objects and its references. IMHO that&#8217;s why both MS and Sun opted for
memory-copying fragmentation-guard GC algorithms. And I like Mono to provide
_standard_ solution. Now I am depressed that I cannot simply port my program
(that works well on MS.Net and would work if it is written in Java) to Mono.

Marek Paska

_______________________________________________
Mono-gc-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-gc-list