Performance
From OpenSimulator
Contents |
Introduction
OpenSim performance is a very complex issue. Performance can be affected by any number of things, including the number of prims on a region, number of regions, number of avatars, network quality between server and viewer, network quality between simulator and grid services, etc.
Hardware Requirements
Unfortunately, this is a very difficult question in light of all the factors mentioned above. Below are some examples of hardware people use/have used. Please feel free to add to the list, or to add any reports to the performance reports section. These are examples to help you in your selection, not necessarily recommendations.
Object Parts ~= # prim
Sensors and Timers are generally more intensive then regular scripts, so please specify quantity of each.
Description | Operating System | RAM/AVG_USE_% | CPU | #/type of regions | # simultaneous avs | #scripts/timers/Sensors | Location | #objectparts |
---|---|---|---|---|---|---|---|---|
hosted Xen VPS | Ubuntu Intrepid (8.10) | 540MB/? | 1x quad-core 2.5GHz Xeon (L5420) | 1 region + 9 voids | generally 1-2 | few | Knifejaw Atoll & surrounding on OSGrid | ? |
hosted Xen VPS | Ubuntu Jaunty (9.04) | 360MB/? | 2x dual-core 2.0GHz Xeon (5130) | 1 void | generally 1-2 | none | Knifejaw Road on OSGrid | ? |
cari.net Core2Duo | Microsoft Windows Server 2003 Standard Edition SP2 | 1300mb | Intel(R) Core(TM)2 Duo CPU E4400 @ 2.00ghz 1.99gb of Ram | 16 voids 6 Full Regions | 2-10 | 1500+ scripts / ?? timers / ?? sensors | Arizona Bay I-IV / Ku 1-10 / (OKC) Sui / (OKC) Ka / Jedi / Sith / Underverse / Monopoly (all@osgrid) | 20000+ Prims |
Dedicated Server from A+ | Windows Server 2003 | 1 Meg | 1x single-core 2.8GHz Celeron | 2regions per server | 6 at once with no issues | Waterfalls, texture anims, window texture switchers, lots of sound loops | Pleasure Planet Welcome center & Region Pleasure Planet in OSGrid | 20000 prims per region |
Amazon EC2 "high-CPU medium instance" (Xen VM) | Windows Server 2003 | 1.7GB | 1x dual-core 2.3GHz (Intel E5345) | 1 region with sailing race course | 7 avs, 4 in boats | scripted start line | Castle Rock, OSGrid |
Performance studies
These are technical studies, but they do provide some interesting data on the performance limitations of OpenSim at various points in time.
- http://www.sciencesim.com/wiki/doku.php/vwperf/start - Links to ScienceSim performance studies, including some very recent ones.
- Improving Performance - An old page from July 2009 detailing some performance issues on OpenSim. Some of these issues are still valid (e.g. ODE issues).
- NHibernate Performance Testing — SQLite and MySQL performance tests with NHibernate.
- LibSecondLife performance problems - Another old page from November 2007 detailing issues with libsecondlife (now called libopenmetaverse).
- Experiences from Operating a 3D Region Server in OSGrid - Part 1
- Experiences from Operating a 3D Region Server in OSGrid - Part 2
Specific performance hints
Here are some specific things you might be able to do to improve performance
Running Squid on your region server as a reverse proxy to the asset server
1. Download and install the Squid Proxy from: http://www.squid-cache.org/Download/
2. Create your squid.conf configuration file.
3. Change your asset_server configuration in your OpenSim.ini to point to http://localhost:3128/
4. Start everything up!
Now assets will be cached in the squid cache on the region server, and will be served up much faster, especially on region restart.
GC_NO_EXPLICIT
Sometimes this patch applied to mono-svn has helped my sim run a lot faster and not slowly get bogged down.
$mono-svn-root$/mono
mono/metadata/boehm-gc.c
Index: boehm-gc.c =================================================================== --- boehm-gc.c (revision 105684) +++ boehm-gc.c (working copy) @@ -107,6 +107,10 @@ void mono_gc_collect (int generation) { + static int no_explicite_gc = 0; if (no_explicite_gc==0) {if (getenv("GC_NO_EXPLICIT")) {no_explicite_gc = 1;return;} else {no_explicite_gc = 2;}} else if (no_explicite_gc==1) { + g_print("\n --------GC_NO_EXPLICIT \n"); + return; + } MONO_PROBE_GC_BEGIN (generation); GC_gcollect ();
Not only this, but I recompile the mono runtime:
--with-large-heap=yes
Otherwise, the Sim is limited to 3GB RAM. Probably, this second peice is more important. But still, afterwards it's worth a shot to test with both to see if there is a difference in performance:
export GC_NO_EXPLICIT=1
and
unset GC_NO_EXPLICIT
What I think, (only a guess) is that Mono starts internally GC thrashing in fishing expeditions to gaining maybe 1k of RAM at time. And by having a large heap (>3GB), it is possible might keep mono less apt to do stop world complete collections as often.