[Mono-devel-list] xsp.exe virtual size grows without bound -- large messages
lluis at ximian.com
Fri Dec 17 11:44:22 EST 2004
My guess is that this is a GC issue. Although the amount of memory used
is high, in my tests it looks steady. I'm pretty sure that MS needs to
allocate as much memory, but their GC may be performing better. Sending
big chunks of byte arrays as parameters is not a good idea, it has a lot
of memory and processing overhead.
On dc, 2004-12-15 at 17:51 -0800, jrodman at mono-list.spamportal.net
> Hello Monoites,
> We're using xsp to host a relatively trivial SOAP-based web service
> which receives binary files. The files are sent as byte arrays in
> single calls. This uses a fair amount of memory, and may not be
> optimally efficient, but for our purposes that's probably fine, and
> there are significant reasons to be using as vanilla SOAP as possible.
> Particulars: This is an Opteron box, with one gig of ram, running SuSE
> Linux Enterprise Server 9, mono 1.0.5 from downloaded (binary)
> x86 packages.
> I have two problems with this setup.
> The small quibble:
> Under mono, both the client and the server, to send a single large
> binary file, will allocate memory in the ballpark of 9 times the file's
> size. I am quite explicitly pulling the entire file into memory, and
> understand that the client is likely encoding that entire data in memory
> rather than sending it while encoding.
> That's fine, and should probably use around 2 to 3 times the original
> file size, due to encoding overhead.
> What I'm seeing, however is mono using in the ballpark of 9 times the
> file's size, which is a bit of a style cramp. We expet to be
> transmitting files in the kilobytes to megabytes range, with extreme
> cases of up to around 20-30 megabytes, where it gets ugly, and programs
> swell into the hundreds of megabytes of virtual size.
> For comparison, Microsoft's runtime seems to keep to roughly 1/3rd the
> size of an equivalent Mono run. That's comparing Task Manager's listing
> of Microsoft's runtime on Windows to ps aux's listing of mono on Linux.
> The serious problem:
> xsp.exe's virtual size grows larger with every data transmission. After
> enough transactions, xsp will begin to swap heavily, and the time to
> transmit will go from on the order of 1 second per megabyte of data down
> to as bad as 15 seconds per megabyte of data. I'm sure it will only get
> worse but when my shell and X session and so on have all long since
> beeen swapped it I lose patience with exploring the extent of the
> It's possible this is some foolish newbie mistake, but I've tried to
> strip it down to the absolute minimum and sanity check my understanding
> of everything I'm doing with peers, and I really don't think so.
> Attached you can find a trivial server and client which I have been
> using to produce this behavior.
> Thank you for your feedback and test results.
> Joshua Rodman
More information about the Mono-devel-list