Performance

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Hardware Requirements)
(Hardware Requirements)
Line 113: Line 113:
 
|<1000 prims
 
|<1000 prims
 
|-
 
|-
|VPS on shared server
+
|VPS
 
|Debian Lenny 5 (mono 2.4.2.3)
 
|Debian Lenny 5 (mono 2.4.2.3)
 
|OSgrid 0.7.1 (Dev) cd4d7a7: 2010-10-15
 
|OSgrid 0.7.1 (Dev) cd4d7a7: 2010-10-15

Revision as of 15:43, 26 October 2010

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 studies and blog posts 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 (please add Mono version if appropriate) OpenSim version RAM/AVG_USE_% CPU #/type of regions # simultaneous avs #scripts/timers/Sensors Location #objectparts
hosted Xen VPS Ubuntu Intrepid (8.10) Unknown 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) Unknown 360MB/? 2x dual-core 2.0GHz Xeon (5130) 1 void generally 1-2 none Knifejaw Road on OSGrid ?
Dedicated Server from A+ Windows Server 2003 Unknown 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 Unknown 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
Dedicated Server from simhost.com SuSe 11.2 x64 Unknown 8gb / 50% 4x Core2Quad Q9300 2.6ghz 1 region (Wright Plaza) uses approx 4gb ram 20-25 users Freebie Stores / Meeting Center / Video Theater @osgrid.org Heavy Use Sim 17500 prims aprox 1500 scripts
Home machine Windows XP SP3 0.7.0.1 (Diva r13558) 3GB / 15-40% incl. Opensim and MySQL 4x Core2Quad Q6600 2.4 GHz. Use: generally, 0-10% 11 regions 1-6 users Many scripted objects (1934 scripts) Condensation Land 38,065 prims
Home machine Ubuntu Lucid 10.04 (32 bit pae) 0.7.0.1 (Diva r13558) 160Mb no users, add 5Mb/user incl Opensim and MySQL I7-920 (dual threaded quad core), 3.8Ghz, 6Gb RAM, 0-10% Load 4 regions (Diva default config) 1-4 users (approx 20Kb/sec bandwidth/user) Few scripted objects (<10) Mars Simulation- Based on Erik Nauman's Open Blackboard 158 prims
Parallels Virtuozzo Container 4.5 Win/Net (32 run) 0.7 (D2) 320Mb total, incl Opensim and MySQL Q6600 Quad, 2.8Ghz, 2Gb RAM, 0-2% Avg Load 9 regions (3x3 mega-region) <6 users vehicle scripted objects (<5) Metaverse Sailing <1000 prims
VPS Debian Lenny 5 (mono 2.4.2.3) OSgrid 0.7.1 (Dev) cd4d7a7: 2010-10-15 655MB averabe out of 1722MB RAM, incl. MySQL Intel Quadcore 2.5 Ghz (1 core assigned to vps) average use: 40-45% 20 regions (4x5 mega-region) <4 users about 20 different light scripts, but we're also experimenting with heavier HUD scripts (timers, lots of ll(Get/Set)PrimitiveParams and large lists) and custom IRC relay Phoenix Rising Isles on OsGrid 3727 prims

Performance studies and blog posts

These provide some interesting data on the performance limitations of OpenSim at various points in time.

Performance hints

Here are some specific things you might be able to do to improve performance

Home Based systems

The most obvious performance difference between a home based cable/dsl system and a "commercial" server is the upload bandwidth. A typical home system allows 100Kb/s upload with 12Mb/s download, a "commercial" system typically has a "symmetrical" bandwidth of say 12Mb/s UP AND DOWN! "Commercial" systems can essentially buy unlimited bandwidth as needed, but it does get expensive to buy bandwidth that you don't need!

In practice this limits the number of "external" users on a "home system" to 4 or 5, but LAN users (NPCs/bots etc.) are essentially unlimited.

A reasonable strategy (i.e. MY strategy) is to use the home system for experimentation and then move the entire sim to a "commercial" VPS service if the sim gets popular (and produces enough $$$ to pay the freight!)

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.

Personal tools
General
About This Wiki