Monday, June 30, 2008

News You can USE


Recently, Nebadon Izumi (another of the OSGrid admins) and I conducted a very interesting and productive test on OSGrid. We employed a light-weight patch against mono trunk that enables the use of large heaps on linux, and compared it against a similarly loaded windows region running .net.

This post is a general description of the test - a more detailed analysis will follow shortly.

The test was basically comprised of DMiles' (#opensim-dev, FreeNode IRC) patch (which can be found at, and related instructions.

Our initial test involved enabling the Boehm garbage collector as per the instructions and testing against an empty sim which we then populated with multiple copies of the same scripted prim.

This reference prim contained a script which loads a radar map from on 15 minute intervals, then paints it on the prim face with the proper osFunction().

Using the patched mono I was able to load no less than 1024 of these prims into the region.

The region ran for some 12 hours without significant issue.

Memory consumption for the region was 1.3 GB

While this rendered the region unusable from a client running on the same box as the test region (my normal approach to things), it was still quite useable from a different box on the same lan, as were the other four regions running on the same hardware.

Speaking of hardware, my configuration is as follows. I'll include the software while I'm at it:

Pentium D dual core running at 3.0GHz
2 GB ram
SATA HD subsys
10/100 switched network
Tier II DSL (256 DN/96 UP)

Debian Linux unstable branch (sidux)
Mono svn (a recent revision - sorry, the best I got right now)
OpenSim r5189 (at the time of this test)
MySQL 5.2

Other sifgnificant facts about my installation:
It's my desktop machine, so typically runs an mp3 player spinning from the local disk;; and the client.

My OpenSim configuration is OSGrid attached with a MySQL backstore for the regions' assets and grid inventory.

As for more general workaday useage, it goes something like this:

My home region on OSGrid, Hoffman, has around 1000 prims, and around 100 scripts (animated fires mostly). With a single avatar on the region, it typically consumed around 120-160 MB. Since the application of this patch to mono, the footprint has decreased by some 40 MB on average. This is consistent with the reduction in footprint when the sim is unoccupied, when I have seen memory usage drop to a low point of 35MB - typical useage under these conditions pre-patch was around 70MB.

Nebadon's findings on windows/.net reflected a similar memory usage profile. His installation is a Core2duo at 2.2GHz with 2GB ram running Windows 2003 Server and .net; everything else pretty similar except he has a much faster internet connection (the winserver in question is hosted at He ran 500 or so of the same test scripts; his memory consumption bounced around a lot between 500MB and 1GB depending on whether or not he left his avatar idling. Mostly closer to 500MB.

All in all, at least anecdotally, every indication is that this is a Good Thing to do for your regions.

*** note: at the time of this writing, the patch is known to be broken due to a hand edit gone bad. A few plus signs are missing somewhere. It was trivial, however, to apply the code change with a manual insertion of the code to the mono source. Will attempt to get DMiles to polish this a bit Real Soon Now.

Hope this gets you more bang for your OpenSim buck!