Fine tuning OpenSim server in OSGrid and migration to a new server

I have run a couple of regions on an old MacBook for a few months now. It has been running really well and it has been so much fun meeting new people and learning all these new things. But one thing has been a bit annoying…  lol, and that is the sound from the fan from the MacBook. It is not really intended or built for that kind of server work and had to spin real hard to keep things going. So I decided it was time to take the next step.

I got my hands on a new Mac mini (no that’s not my hands… ;o)  It comes in two versions and even if there is no big difference one of them is intended for server use. It really is an incredible competent little machine and it is dead silent so I can keep it in my music studio. My mini is equipped with 4 GB RAM and has a 2,66 GHz Intel Core 2 Duo-processor, 3MB shared L2-cache on the processor module, and a 1066 MHz system buss. So even if it looks like a toy it is a rather capable machine that even got a FireWire 800 port.

It is possible to run OpenSim on Mac OSX but as very few does that yet and as the development of OpenSim is on Linux I decided to stick to Ubuntu this time too, but i went  for the latest version called 11.04 that was released in april in 2011. Installation of the operating system and the last version of OpenSim went perfectly smooth and you can read about that process in one of my earlier posts. Then i would like to move all my regions and all the scripts and objects on them to the new server. There are different ways to do this but I followed these steps.

The old OpenSim server should be up and running and you go to the terminal window on the server:

1. Type change region Alinja  (where alinja is the name of one of your regions)
2. The prompt changes into Region (Alinja):
3. Type save oar ../Alinja.oar

This saves all things on the region to a special file with the extension .oar and the file will be placed in the directory above the directory you are in (normally the user directory)

4. Then repeat these steps for all the regions you have

5. Copy all oar-files and the bin/Regions/Regions.ini file to the new server. I used a simple USB-memory stick for this as the files are not that big

6. Place the Regions.ini in the bin/Regions directory and prepare to start up the server… but hey wait a bit!

On Linux OpenSim runs under a system called mono that is the open and free worlds replacement for .net development environment from Microsoft. The mono environment might need some fine tuning if you run more than one region. It is however very easy to do so I recommend that you do this in any case.

Just go to the user directory on the server (/home/<user>) and open the .bashrc file with an editor. If you do this from a terminal window you just type: gedit .bashrc 

If you prefer to use the file management tool you have to change show hidden files in the preferences to be able to see files that starts with a dot like .bashrc. They are normally hidden from view in the file management tool.

So now we have have the file in the editor, then just ad the the line below and save the file.


This will make it possible for the mono system to run more parallel threads on each processor and your OpenSim system will be much more smooth and responsive and maybe you get rid of some of the problems you have experienced in the past.

So that was the first fine tuning… now lets do the other one I had on my mind!

If you are in a non english speaking country chances are that you have set up your server to reflect that. Then you might be a victim for a strange bug in OpenSim that will break your TP:s. However it is easy to fix this by just changing the startup line for your server to this:

sudo env LANG=C mono OpenSim.exe

So just type that in the terminal window instead of the previous startup command in my earlier blog post. Then the environment that OpenSims runs in will use the standard locale settings and your TP:s from your sims will work.

Now the OpenSim server is running and all the regions are in place, but still totally empty. Just follow the steps below the get all your stuff in place once more.

1. Type change region Alinja
2. Type load oar ../Alinja.oar
3. Wait… and wait. Please be patient here if you have a lot of things on your regions.      This can take up to 15 minutes if you have 1000 objects and scripts.

Then just repeat the steps 1 – 3 for the rest of your regions… and Voila! Deja Vu!

(Remember the world map wont get updated until you restart your simulator.)

Post a comment or leave a trackback: Trackback URL.


  • Anna Loom  On June 25, 2011 at 4:58 am

    Shame about the hands ;o)

    Your instructions make the process of connecting with your own server sound so simple –
    you are a great teacher – thanks – kiss

  • T  On September 3, 2012 at 7:24 pm

    Interesting that you put Ubuntu on the Mini. I Run five regions on a mini using mac os 10.8 and mono 2.6.7 and 9 on a PC using Ubuntu 12.04 and the very latest mono. The mini does ok and I’m thinking up upgrading the mono on it, but the Ubuntu server is a rock.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: