Posts: 3
Joined: Sun Dec 09, 2012 10:39 pm

Opensimulator testing results

Mon Dec 10, 2012 2:09 am

http://opensimulator.org/ - for those interested in what I wanted to do.

Hello everyone,

I just got my Raspberry Pi and decided one of the many things I would like to do with it is to host an OpenSim Region on it so that I can work offline from Secondlife building objects and animations without being disturbed by lots of IM's.

But why the Pi? It's massively underpowered and the applications to drive OpenSIM are insanely bloated. Because sometimes I have my friends login and i don't want to keep a big power consuming monster running 24/7. I got Opensim to work on a ancient Pay-By-Touch box which had a low powered Via x86 500Mhz processor in it and it worked for my needs. And decided if it worked needs there, why not a Pi?

Now I'm no programming genius or nothing like that. I'm just telling you of my trials of openSIM and the Pi in case someone is interested on how I managed to get it working.

When I first googled people running OpenSim on their Pi. I came across this http://pastebin.com/arFgQHSD which if anyone uses the Raspbian edition on their Pi and goes through the steps of installing all of the dependencies this is what I got as well.

I first tried to work around this problem by installing MySQL so that Mono didn't have to deal with the SQL-lite and crash right there. And I encountered another crash when I tried to create a new region. Then I decided to build a region on my PC and backup my openSIM database and restore on the Pi.. that worked! however there was a lot of red errors in the OpenSIM console and I couldn't login with my SecondLife Firestorm client into my OpenSIM. I couldn't get it to be stable reguardless if I built OpenSIM on the Pi with Nant or if i ran the binary right off of the website.

Going through the dependencies I found this thread which pretty much summed up why OpenSIM will not work out of the box on Raspbian http://www.raspberrypi.org/phpBB3/viewt ... 6&p=130990 talks about how the Mono programming language does not support hard float commands that the Rasbian OS relies on and hence why you will get unpredictable results. And this is a Debian issue more then Raspbian or the Pi itself. From the progress notes on developing a hard-float mono programming language it seems they are waiting for mono 3.0 to come out instead of fixing the current Mono 2.0 language.

Well! I was determined to get OpenSIM working on my Pi.. So I then downloaded the soft-float version of Raspbian. And it was able to use the SQL-lite database that mono likes to use and ALMOST runs right out of the box which is awesome!

I said 'almost' because OpenSIM still crashes when it tries to initialize the ODE Physics libraries. I even tried to compile my own ODE Physics libraries in accordance to http://opensimulator.org/wiki/Build_Instructions which built successfully with no errors. But it still crashes giving me memory errors like crazy!

Well, I just want to see OpenSIM run, so i modified my opensim.ini file and disable ODE Physics and enable basic physics. And I FINALLY got to my region console with no errors!

How was the performance? Well, OpenSim was giving me a few warnings about 5000ms+ latency when logging in, but I was able to move, upload images to my SIM, and build with prims without issue all by myself, I had a second PC log into OpenSIM and still not much with lag, when OpenSIM is idle it's eating %20 CPU power. However, when it came to more complicated things like running scripts and terraforming land that's when the CPU went to %100 and started to lag a bit!

When i restore my OpenSim database from my PC which had a lot of images and land terraforming already complete, it was around 200MB of ram just to run the application. So if you have a 256mb Raspberry Pi this program may be a little too heavy to run on it. With default settings, no objects, and first-time login you're looking at about 60MB of memory usage. now keep in mind, if you hook up your OpenSIM to a service that takes care of the database and assets then you could shave a lot of memory off of your Pi

The only thing I have not tried is finding a work-around for the ODE Physics engine. OpenSIM has an alternative engine called 'bulletphysics' which is said to actually be easier on the CPU then the default ODE physics. but I'll need to compile the source in order to see if it even works.

So right now as of this posting. The Raspberry Pi is not ready for OpenSimulator yet. but if Mono 3.0 comes out with hard float usage and if either the odelib-dev package gets working OR bulletphysics works. Then it might be feasible to have your own little personal SIM for educational purposes and leave it running on one of the many grids taking very little power to boot!

Well, if anyone has other experiences to share, or if they know how to get ODE Physics working, or if they can find a hard float edition of Mono that simply cannot be found via google. I'd love to hear about it and give it a try!

Thanks again! Even though it can't do OpenSIM yet, I'm still loving the Pi.

- S

Posts: 7
Joined: Mon Mar 23, 2015 2:00 pm

Re: Opensimulator testing results

Sat Jun 11, 2016 1:42 pm

Hi s-config... any experiences with Raspberry Pi 2 running Jessie? I'm curious how close it comes now to meeting the needs of OpenSim.

Posts: 3
Joined: Sun Dec 09, 2012 10:39 pm

Re: Opensimulator testing results

Wed Jan 10, 2018 7:51 am

Hello again.

Although late to the party I'll answer.

I'm happy to report that many of the issues I initially had were more dealing with an under-developed mono package which has been cleared up as the mono-project makes arm libraries for it now. In regards to Bullet the kernel upgrade from Wheezy to Jessie made it possible to compile that without issue as well. With the introduction of Raspberry Pi 2 and 3 unit multi-core processing helps out OpenSim immensely because even though the physics engine relies on a single thread the scripting and background processes can go on different threads thus no choking going on when running your own sim.

Although memory requirements state that you need at least a gig of ram. That really depends on how many scripts/objects you have within a region. I run a region with about 300 objects and a half dozen scripts and it sits around 18 megs in size. If a region is totally packed with 50,000 objects with 100's of scripts running it may be a different story.

So progression over the years is this: Single Core Raspberry Pi's like the Pi Zero gets the SIM or region limping along but isn't great for more then one person. Raspberry Pi 2's and 3's can actually handle about 2-5 people so long as they don't go nuts with the physics.

Software wise an improvement would be if the physics engine allowed multi-threading as most of the time opensim underneath mono only takes up two cores at a time. If physics was multi-threaded that would start to see region speeds as good as a low-end desktop. Which is super-impressive out of the Pi. . OpenCL would be nice as well to actually use that GPU for something but OpenCL support both physics libraries OpenSIM supports is not mentioned.

The only thing to make OpenSimulator better hardware wise is raw CPU power. While there are stronger ARM processor boards out there. The fastest to setup and the best bang for your buck is still the Raspberry Pi.

For any who find this thread and want to try running your own OpenSim region. I've documented the instructions on my blog:

https://www.s-config.com/opensimraspber ... oat-works/

It's a little long. But due to the nature of the server a lot of topics had to be covered (Mono, MySQL, Physics, OpenJpeg, etc)

Take care,

- S

Posts: 257
Joined: Sun Dec 31, 2017 4:35 pm

Re: Opensimulator testing results

Mon May 07, 2018 6:48 am

I've been toying with this idea. I currently have a 12 region sim hosted on a VPS, and wondering about the viability of migrating the server to a set of raspberry Pi.

I could split the regions across 2 or 3 Pi 3B+, and possibly host the MySql server on another. I'd have rootfs for each on an NFS drive to avoid stressing the sdcards.

Just wondering if anyone knows the performance capability of the 3b+ for this use. Max 5 users seems to be a little limited for what I want. (It's a public sim, and so may be empty, or may be packed to the gills).
Headless PI. OMG, someone cut it's head off. Oh, hang on. it didn't have one to start with.

Return to “Gaming”