Performance

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Moving content from GC_NO_EXPLICIT page)
Line 1: Line 1:
__NOTOC__
 
 
{{Template:Quicklinks}}
 
{{Template:Quicklinks}}
<br />
 
  
 
==Running Squid on your region server as a reverse proxy to the asset server==
 
==Running Squid on your region server as a reverse proxy to the asset server==
Line 10: Line 8:
  
 
Now assets will be cached in the squid cache on the region server, and will be served up much faster, especially on region restart.
 
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
 +
 +
<pre>
 +
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 ();
 +
</pre>
 +
 +
Not only this, but I recompile the mono runtime:
 +
<pre>--with-large-heap=yes</pre>
 +
 +
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.

Revision as of 00:08, 19 October 2009

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