<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joe+Radik</id>
		<title>OpenSimulator - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joe+Radik"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Special:Contributions/Joe_Radik"/>
		<updated>2026-05-31T10:33:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/wiki/Show_stats</id>
		<title>Show stats</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Show_stats"/>
				<updated>2014-07-23T14:32:34Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* threadpool */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;quot;show stats&amp;quot; is a new statistics gathering mechanism is slowly being added to OpenSimulator to integrate previously separate and ad-hoc mechanisms.  For this system, you can see a short statistics summary with the command &amp;quot;show stats&amp;quot; and a much longer list of statistics with the &amp;quot;show stats all&amp;quot; command (which unfortunately doesn't yet include those in the summary!).&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;help show stats&amp;quot; command on the console for more information.&lt;br /&gt;
&lt;br /&gt;
See [[Monitoring]] for information on other statistics gathering mechanisms for OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
=General=&lt;br /&gt;
The full name of a stat has three components, separated by periods (.).  In order, these are&lt;br /&gt;
&lt;br /&gt;
* '''category''' - The category of the stat (e.g. server, scene)&lt;br /&gt;
* '''container''' - The containing object for this stat.  For example, on scene this is the scene name (e.g. region 1).  For server, this is the component to which the stat relates (e.g. memory, processor).&lt;br /&gt;
* '''name''' - The stat itself.  For example, ClientLogoutsDueToNoReceives or SimFPS.&lt;br /&gt;
&lt;br /&gt;
=Statistic types=&lt;br /&gt;
&lt;br /&gt;
There are currently three types of statistic.&lt;br /&gt;
&lt;br /&gt;
== Number ==&lt;br /&gt;
This is just a number, possibly with a unit.  For example&lt;br /&gt;
 &lt;br /&gt;
 server.threadpool.STPActiveThreads : 15 threads&lt;br /&gt;
&lt;br /&gt;
== Change over time ==&lt;br /&gt;
This is a number that also shows the last delta between samples and also a moving average of deltas over the last 20 samples, each taken 5 seconds apart.  For example&lt;br /&gt;
 &lt;br /&gt;
 clientstack.test one.IncomingUDPReceivesCount : 98, 1.2/s, 1.7/s&lt;br /&gt;
&lt;br /&gt;
== Percentage ==&lt;br /&gt;
This is a percentage with the antecedent and consequent also given.  For example&lt;br /&gt;
&lt;br /&gt;
 clientstack.test one.PacketsReused : 37.91% (116/306)&lt;br /&gt;
&lt;br /&gt;
=Statistics=&lt;br /&gt;
&lt;br /&gt;
'''This information is highly subject to change as suitable data gathering is an evolving area.  Need to keep adding stats.'''&lt;br /&gt;
&lt;br /&gt;
==clientstack==&lt;br /&gt;
&lt;br /&gt;
These are stats for the LLUDP clientstack that sends and receives UDP messages for viewers connected with the Second Life protocol.  Each stats with clientstack.&amp;lt;region-name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| InboxPacketsCount || messages || The number of messages that have been pre-processed by an inbound network thread but are now waiting to be processed by the main Incoming Packets thread.  If this number exceeds 0 for more than one sample then your simulator cannot cope with the number of UDP messages that clients are sending.  Region performance will be degraded from the user perspective.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketPoolCount || messages || The number of packet objects currently in the memory pool to deal with incoming messages.  This pool is used to reduce memory churn and hence improve simulator performance.  The actual number is never an issue since OpenSimulator will create new pool objects as required.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketsMalformedCount || messages || Number of malformed packets that the simulator received from viewers.  A high and increasing number may indicate a network attack.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketsOrphanedCount || messages || Number of well-formed packets that the simulator received but did not relate to any currently logged in viewer.  Because viewers can disconnect in the middle of a datastream, we would expect to see a certain number of such packets in the course of normal operation.  However, if the number is very high (e.g. tens of thousands) and/or increasing then this may indicate a network attack.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==httpserver==&lt;br /&gt;
&lt;br /&gt;
These are stats for OpenSimulator's built-in HTTP server.  Statistics are partitioned (contained) by the incoming port number to which they relate.  For example, httpserver.8002.HTTPRequestsServed are all the HTTP requests served that came in to port 8002.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| HTTPRequestsServed || requests || The number of HTTP requests served.&lt;br /&gt;
|-&lt;br /&gt;
| ProcessedPollResponses || responses || The number of responses sent to the viewer in response to poll requests.&lt;br /&gt;
|-&lt;br /&gt;
| QueuedPollResponses || responses || The number of responses queued for the next viewer poll.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==scene==&lt;br /&gt;
&lt;br /&gt;
These are stats relating to the graphical simulated scene.&lt;br /&gt;
&lt;br /&gt;
Each starts with scene.&amp;lt;region-name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| RootAgents || avatars || The number of root agents in the scene.  A root agent is associated with an avatar since a root agent is needed for full sim functionality (e.g. moving around).&lt;br /&gt;
|-&lt;br /&gt;
| ChildAgents || agents || The number of child agents in the scene.  A child agent has limited functionality and is used by the viewer mainly to observe events in another scene (i.e. so that the user can see what's occuring in neighbouring regions).&lt;br /&gt;
|-&lt;br /&gt;
| FrameTime || ms || The amount of time taken by OpenSimulator to complete the last frame.  The standard frame time is 18.18ms.  In normal conditions there will be some small variation above and below this number, probably due to the low resolution of thread sleeping.  This number may occasionally jump if the underlying VM (Mono or .NET) takes a long time to perform a garbage collect.  If this number is consistently higher then your simulator is overloaded.&lt;br /&gt;
|-&lt;br /&gt;
| PhysicsTime || ms|| Amount of time spent performing physics engine operations in a scene frame.  If this is consistently high enough to make the FrameTime exceed the 18.18ms standard then region performance will be degraded.  You will need to reduce the number of physical objects in your region.  For OpenSimulator 0.7.6, ODE is used single-threaded and so extra cores will make no difference to performance.&lt;br /&gt;
|-&lt;br /&gt;
| SpareTime || ms|| The amount of time that was left over after OpenSimulator had performed all operations required in the current scene loop.  During this period OpenSimulator sleeps the thread.&lt;br /&gt;
|-&lt;br /&gt;
| SlowFrames || frames || In theory, this records the number of frames which took more than the standard frame time to execute.  However, this measure may be buggy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==server==&lt;br /&gt;
These are stats relating to the server itself.&lt;br /&gt;
&lt;br /&gt;
===thread===&lt;br /&gt;
&lt;br /&gt;
These are the times in milliseconds since the monitored thread last performed any activity.  This is the same as the &amp;quot;LAST UDPATE&amp;quot; information shown by the &amp;quot;show threads&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
===threadpool===&lt;br /&gt;
&lt;br /&gt;
These are server threadpool stats. &lt;br /&gt;
&lt;br /&gt;
Each starts with server.threadpool.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| BuiltinThreadpoolIOCPThreadsAvailable || threads || The number of pooled thread objects waiting to handle incoming IO requests.  OpenSimulator sets this to a very high number by default.  If you ever see this approach zero then your simulator is severely overloaded with respect to processing raw incoming IO requests.&lt;br /&gt;
|-&lt;br /&gt;
| BuiltinThreadpoolWorkerThreadsAvailable || threads || The number of pooled thread objects in the Mono/.NET native threadpool available to handle requests.  If you have async_call_method = UnsafeQueueUserWorkItem (or QueueUserWorkItem though &amp;quot;unsafe&amp;quot; is fine for our purposes) then is used for all OpenSimulator's threading requirements.  If you have async_call_method = SmartThreadPool (which is the current default), then SmartThreadPool handles all the heavy thread launching requirements (and so see the server.threadpool.STP* stats).  If this figure approaches zero then you simulator is severely overloaded.&lt;br /&gt;
|-&lt;br /&gt;
| STPInUseThreads || threads || The number of SmartThreadPool threads currently in use.  If this climbs to the maximum allowed by STPMaxThreads then the simulator will experience general performance degradation.  In this case, try increasing the MaxPoolThreads setting in the [Startup] section of OpenSim.ini (e.g. to 150).&lt;br /&gt;
|-&lt;br /&gt;
| STPMaxThreads || threads || Maximum number of threads that the SmartThreadPool will use.  This is set by the MaxPoolThreads setting in the [Startup] section of OpenSim.ini (or OpenSimDefaults.ini).&lt;br /&gt;
|-&lt;br /&gt;
| STPWorkItemsWaiting || items || The number of work items waiting because all SmartThreadPool threads are busy with current work items.  You will see this start to climb if STPInUseThreads == STPMaxThreads.  You never want to see this situation - if you have work items waiting then try increasing your MaxPoolThreads setting.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= stats record =&lt;br /&gt;
'''Please note that in OpenSimulator 0.7.6 this command was &amp;quot;debug stats record&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
'''Unfortunately, a bug in OpenSimulator 0.8 means that the command &amp;quot;stats record start|stop&amp;quot; will not work properly and will report a usage error with the old command name.  The workaround is to repeat the last command twice (e.g. &amp;quot;stats record start start&amp;quot;).'''&lt;br /&gt;
&lt;br /&gt;
This is an experimental facilty starting in OpenSimulator 0.7.6 which will record the results of &amp;quot;show stats all&amp;quot; to a log file every 5 seconds.  The aim is to record statistical information throughout a session for later analysis.  The logging is enabled with the console command.  It works on both the simulator and a ROBUST instance.&lt;br /&gt;
&lt;br /&gt;
 # stats record start&lt;br /&gt;
 Now recording all stats to file every 5000ms&lt;br /&gt;
&lt;br /&gt;
To stop logging, either shutdown the server or use the command&lt;br /&gt;
&lt;br /&gt;
 # stats record stop&lt;br /&gt;
 Stopped recording stats to file.&lt;br /&gt;
&lt;br /&gt;
The log file used has the same name as the main logfile for the executable with the word &amp;quot;Stats&amp;quot; appended.  For instance, turning on stats logging for OpenSim.exe will write to the file OpenSimStats.log.  For Robust.exe, this will write to RobustStats.log.&lt;br /&gt;
&lt;br /&gt;
Currently and in OpenSimulator 0.7.6, this logging requires entries in OpenSim.exe.config (and Robust.exe.config for Robust).  If you are using your own version of these files then you will need to adapt them for the logging entries.&lt;br /&gt;
&lt;br /&gt;
The performance impact of such logging should be low, though the log file size can grow quite large.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Tools to analyze record stats data are under development at https://github.com/justincc/opensimulator-tools/tree/master/analysis/opensimulator-stats-analyzer.  This includes summary and graphing tools.&lt;br /&gt;
&lt;br /&gt;
= stats save =&lt;br /&gt;
'''Command added in development code from 20th March 2014.'''&lt;br /&gt;
&lt;br /&gt;
This command will save a snapshot of current statistical data to a given path.  For example&lt;br /&gt;
&lt;br /&gt;
 # stats save stats.txt&lt;br /&gt;
&lt;br /&gt;
If the file already exists, the stats will be appended.&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Show_stats</id>
		<title>Show stats</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Show_stats"/>
				<updated>2014-07-23T14:10:34Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&amp;quot;show stats&amp;quot; is a new statistics gathering mechanism is slowly being added to OpenSimulator to integrate previously separate and ad-hoc mechanisms.  For this system, you can see a short statistics summary with the command &amp;quot;show stats&amp;quot; and a much longer list of statistics with the &amp;quot;show stats all&amp;quot; command (which unfortunately doesn't yet include those in the summary!).&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;help show stats&amp;quot; command on the console for more information.&lt;br /&gt;
&lt;br /&gt;
See [[Monitoring]] for information on other statistics gathering mechanisms for OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
=General=&lt;br /&gt;
The full name of a stat has three components, separated by periods (.).  In order, these are&lt;br /&gt;
&lt;br /&gt;
* '''category''' - The category of the stat (e.g. server, scene)&lt;br /&gt;
* '''container''' - The containing object for this stat.  For example, on scene this is the scene name (e.g. region 1).  For server, this is the component to which the stat relates (e.g. memory, processor).&lt;br /&gt;
* '''name''' - The stat itself.  For example, ClientLogoutsDueToNoReceives or SimFPS.&lt;br /&gt;
&lt;br /&gt;
=Statistic types=&lt;br /&gt;
&lt;br /&gt;
There are currently three types of statistic.&lt;br /&gt;
&lt;br /&gt;
== Number ==&lt;br /&gt;
This is just a number, possibly with a unit.  For example&lt;br /&gt;
 &lt;br /&gt;
 server.threadpool.STPActiveThreads : 15 threads&lt;br /&gt;
&lt;br /&gt;
== Change over time ==&lt;br /&gt;
This is a number that also shows the last delta between samples and also a moving average of deltas over the last 20 samples, each taken 5 seconds apart.  For example&lt;br /&gt;
 &lt;br /&gt;
 clientstack.test one.IncomingUDPReceivesCount : 98, 1.2/s, 1.7/s&lt;br /&gt;
&lt;br /&gt;
== Percentage ==&lt;br /&gt;
This is a percentage with the antecedent and consequent also given.  For example&lt;br /&gt;
&lt;br /&gt;
 clientstack.test one.PacketsReused : 37.91% (116/306)&lt;br /&gt;
&lt;br /&gt;
=Statistics=&lt;br /&gt;
&lt;br /&gt;
'''This information is highly subject to change as suitable data gathering is an evolving area.  Need to keep adding stats.'''&lt;br /&gt;
&lt;br /&gt;
==clientstack==&lt;br /&gt;
&lt;br /&gt;
These are stats for the LLUDP clientstack that sends and receives UDP messages for viewers connected with the Second Life protocol.  Each stats with clientstack.&amp;lt;region-name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| InboxPacketsCount || messages || The number of messages that have been pre-processed by an inbound network thread but are now waiting to be processed by the main Incoming Packets thread.  If this number exceeds 0 for more than one sample then your simulator cannot cope with the number of UDP messages that clients are sending.  Region performance will be degraded from the user perspective.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketPoolCount || messages || The number of packet objects currently in the memory pool to deal with incoming messages.  This pool is used to reduce memory churn and hence improve simulator performance.  The actual number is never an issue since OpenSimulator will create new pool objects as required.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketsMalformedCount || messages || Number of malformed packets that the simulator received from viewers.  A high and increasing number may indicate a network attack.&lt;br /&gt;
|-&lt;br /&gt;
| IncomingPacketsOrphanedCount || messages || Number of well-formed packets that the simulator received but did not relate to any currently logged in viewer.  Because viewers can disconnect in the middle of a datastream, we would expect to see a certain number of such packets in the course of normal operation.  However, if the number is very high (e.g. tens of thousands) and/or increasing then this may indicate a network attack.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==httpserver==&lt;br /&gt;
&lt;br /&gt;
These are stats for OpenSimulator's built-in HTTP server.  Statistics are partitioned (contained) by the incoming port number to which they relate.  For example, httpserver.8002.HTTPRequestsServed are all the HTTP requests served that came in to port 8002.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| HTTPRequestsServed || requests || The number of HTTP requests served.&lt;br /&gt;
|-&lt;br /&gt;
| ProcessedPollResponses || responses || The number of responses sent to the viewer in response to poll requests.&lt;br /&gt;
|-&lt;br /&gt;
| QueuedPollResponses || responses || The number of responses queued for the next viewer poll.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==scene==&lt;br /&gt;
&lt;br /&gt;
These are stats relating to the graphical simulated scene.&lt;br /&gt;
&lt;br /&gt;
Each starts with scene.&amp;lt;region-name&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| RootAgents || avatars || The number of root agents in the scene.  A root agent is associated with an avatar since a root agent is needed for full sim functionality (e.g. moving around).&lt;br /&gt;
|-&lt;br /&gt;
| ChildAgents || agents || The number of child agents in the scene.  A child agent has limited functionality and is used by the viewer mainly to observe events in another scene (i.e. so that the user can see what's occuring in neighbouring regions).&lt;br /&gt;
|-&lt;br /&gt;
| FrameTime || ms || The amount of time taken by OpenSimulator to complete the last frame.  The standard frame time is 18.18ms.  In normal conditions there will be some small variation above and below this number, probably due to the low resolution of thread sleeping.  This number may occasionally jump if the underlying VM (Mono or .NET) takes a long time to perform a garbage collect.  If this number is consistently higher then your simulator is overloaded.&lt;br /&gt;
|-&lt;br /&gt;
| PhysicsTime || ms|| Amount of time spent performing physics engine operations in a scene frame.  If this is consistently high enough to make the FrameTime exceed the 18.18ms standard then region performance will be degraded.  You will need to reduce the number of physical objects in your region.  For OpenSimulator 0.7.6, ODE is used single-threaded and so extra cores will make no difference to performance.&lt;br /&gt;
|-&lt;br /&gt;
| SpareTime || ms|| The amount of time that was left over after OpenSimulator had performed all operations required in the current scene loop.  During this period OpenSimulator sleeps the thread.&lt;br /&gt;
|-&lt;br /&gt;
| SlowFrames || frames || In theory, this records the number of frames which took more than the standard frame time to execute.  However, this measure may be buggy.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==server==&lt;br /&gt;
These are stats relating to the server itself.&lt;br /&gt;
&lt;br /&gt;
===thread===&lt;br /&gt;
&lt;br /&gt;
These are the times in milliseconds since the monitored thread last performed any activity.  This is the same as the &amp;quot;LAST UDPATE&amp;quot; information shown by the &amp;quot;show threads&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
===threadpool===&lt;br /&gt;
&lt;br /&gt;
These are server threadpool stats. &lt;br /&gt;
&lt;br /&gt;
Each starts with server.threadpool.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Stat name !! Units !! Description&lt;br /&gt;
|-&lt;br /&gt;
| BuiltinThreadpoolIOCPThreadsAvailable || threads || The number of pooled thread objects waiting to handle incoming IO requests.  OpenSimulator sets this to a very high number by default.  If you ever see this approach zero then your simulator is severely overloaded with respect to processing raw incoming IO requests.&lt;br /&gt;
|-&lt;br /&gt;
| BuiltinThreadpoolWorkerThreadsAvailable || threads || The number of pooled thread objects in the Mono/.NET native threadpool available to handle requests.  If you have async_call_method = UnsafeQueueUserWorkItem (or QueueUserWorkItem though &amp;quot;unsafe&amp;quot; is fine for our purposes) then is used for all OpenSimulator's threading requirements.  If you have async_call_method = SmartThreadPool (which is the current default), then SmartThreadPool handles all the heavy thread launching requirements (and so see the server.threadpool.STP* stats).  If this figure approaches zero then you simulator is severely overloaded.&lt;br /&gt;
|-&lt;br /&gt;
| STPInUseThreads || threads || The number of SmartThreadPool threads currently in use.  If this climbs to the maximum allowed by STPMaxThreads then the simulator will experience general performance degradation.  In this case, try greating increasing the MaxPoolThreads setting in the [Startup] section of OpenSim.ini (e.g. to 150).&lt;br /&gt;
|-&lt;br /&gt;
| STPMaxThreads || threads || Maximum number of threads that the SmartThreadPool will use.  This is set by the MaxPoolThreads setting in the [Startup] section of OpenSim.ini (or OpenSimDefaults.ini).&lt;br /&gt;
|-&lt;br /&gt;
| STPWorkItemsWaiting || items || The number of work items waiting because all SmartThreadPool threads are busy with current work items.  You will see this start to climb if STPInUseThreads == STPMaxThreads.  You never want to see this situation - if you have work items waiting then try increasing your MaxPoolThreads setting.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= stats record =&lt;br /&gt;
'''Please note that in OpenSimulator 0.7.6 this command was &amp;quot;debug stats record&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
'''Unfortunately, a bug in OpenSimulator 0.8 means that the command &amp;quot;stats record start|stop&amp;quot; will not work properly and will report a usage error with the old command name.  The workaround is to repeat the last command twice (e.g. &amp;quot;stats record start start&amp;quot;).'''&lt;br /&gt;
&lt;br /&gt;
This is an experimental facilty starting in OpenSimulator 0.7.6 which will record the results of &amp;quot;show stats all&amp;quot; to a log file every 5 seconds.  The aim is to record statistical information throughout a session for later analysis.  The logging is enabled with the console command.  It works on both the simulator and a ROBUST instance.&lt;br /&gt;
&lt;br /&gt;
 # stats record start&lt;br /&gt;
 Now recording all stats to file every 5000ms&lt;br /&gt;
&lt;br /&gt;
To stop logging, either shutdown the server or use the command&lt;br /&gt;
&lt;br /&gt;
 # stats record stop&lt;br /&gt;
 Stopped recording stats to file.&lt;br /&gt;
&lt;br /&gt;
The log file used has the same name as the main logfile for the executable with the word &amp;quot;Stats&amp;quot; appended.  For instance, turning on stats logging for OpenSim.exe will write to the file OpenSimStats.log.  For Robust.exe, this will write to RobustStats.log.&lt;br /&gt;
&lt;br /&gt;
Currently and in OpenSimulator 0.7.6, this logging requires entries in OpenSim.exe.config (and Robust.exe.config for Robust).  If you are using your own version of these files then you will need to adapt them for the logging entries.&lt;br /&gt;
&lt;br /&gt;
The performance impact of such logging should be low, though the log file size can grow quite large.&lt;br /&gt;
&lt;br /&gt;
== Analysis ==&lt;br /&gt;
Tools to analyze record stats data are under development at https://github.com/justincc/opensimulator-tools/tree/master/analysis/opensimulator-stats-analyzer.  This includes summary and graphing tools.&lt;br /&gt;
&lt;br /&gt;
= stats save =&lt;br /&gt;
'''Command added in development code from 20th March 2014.'''&lt;br /&gt;
&lt;br /&gt;
This command will save a snapshot of current statistical data to a given path.  For example&lt;br /&gt;
&lt;br /&gt;
 # stats save stats.txt&lt;br /&gt;
&lt;br /&gt;
If the file already exists, the stats will be appended.&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Configuration</id>
		<title>Configuration</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Configuration"/>
				<updated>2014-06-27T15:48:45Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* Running multiple ROBUST service instances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quicklinks}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== OpenSimulator simulator configuration file ==&lt;br /&gt;
The region simulator configuration is managed using a file called OpenSim.ini. This file is used regardless of whether the sim is running in standalone or grid mode. This file references some additional configuration information from the config-include/ directory. Information about the various settings is contained in the OpenSim.ini file itself (or OpenSim.ini.example for reference).&lt;br /&gt;
&lt;br /&gt;
Please note, that the name OpenSim.ini can be changed via [[OpenSim.exe Command Line Options|command line arguments]].&lt;br /&gt;
&lt;br /&gt;
It is also possible to distribute the inifile settings over two files. This is useful if you want to run several OpenSimulator processes where most of your settings are identical except for a few. The master file is read first, then the inifile is read. Settings given in the inifile overrule settings given in the master file. The master file has the same format and the same keywords as the inifile, so the same documentation applies.&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
Opensim supports the following database-engines. Information about setting these up can be found in the OpenSim.ini.example file and the other various example files in bin/config-include.  '''If you do not want to use the default SQLite configuration then you will need to setup your database before proceeding further'''.  SQLite does not require further configuration.  See [[Database Settings]] for the detailed settings.&lt;br /&gt;
&lt;br /&gt;
* '''SQLite''' (default) - a lightweight database that comes bundled with OpenSimulator and can be used without requiring any extra configuration. It is mostly intended to get you up and running quickly, not for production use. It is significantly slower than MySQL. A few features here (such as attachment persistence) have not yet been fully implemented. &lt;br /&gt;
&lt;br /&gt;
* '''MySQL''' (fully supported) - This is the recommended database for any use beyond experimentation or small standalone applications. The minimum MySQL version is 5.1.&lt;br /&gt;
::* '''Windows x64 systems:''' &amp;amp;nbsp;There is currently an unresolved [http://opensimulator.org/mantis/bug_view_advanced_page.php?bug_id=5294 bug_id=5294] found when running OpenSimulator with MySQL 5.5 on Windows x64 systems.&lt;br /&gt;
::* '''Opensim 0.7.0.2:''' &amp;amp;nbsp;Some users have reported problems with MySQL 5.1.55 and up with Opensim 0.7.0.2, see [http://opensim-users.2152040.n2.nabble.com/OpenSim-1-7-0-2-and-MySQL-Versions-td6155064.html this thread] for more information. The issue can be resolved by using an updated version of MySql.Data.dll OR installing an older version of MySQL such as [http://downloads.mysql.com/archives.php?p=mysql-5.1&amp;amp;v=5.1.52 MySQL 5.1.52] with Opensim version 0.7.0.2. &amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
* '''MSSQL''' (fairly supported) - persistence support for some recent OpenSimulator features may not yet be implemented though the vast majority of them are supported.&lt;br /&gt;
&lt;br /&gt;
== Standalone vs. Grid ==&lt;br /&gt;
We recommend that you first get OpenSimulator running in standalone mode before you attempt to connect it to a grid or run your own grid. OpenSimulator will start up in standalone mode out-of-the-box on the binary distributions.&lt;br /&gt;
&lt;br /&gt;
An OpenSimulator configuration consists of regions (run by region simulators) and backend data services (such as user, assets and inventory management).&lt;br /&gt;
&lt;br /&gt;
A system running in '''standalone mode''' runs both the region simulator and all the data services in a single process when you run OpenSim.exe. In this mode you can run as many regions as you like but only on a single machine.&lt;br /&gt;
&lt;br /&gt;
[[Image:Opensim-standalone.png|frame|center|OpenSimulator running in standalone mode. Both simulator and services run in the same process (OpenSim.exe).]]&lt;br /&gt;
&lt;br /&gt;
In '''grid mode''', the data services are not part of the region server process. Instead, they are run in a separate executable called Robust.exe. A Robust shell can run all the services or they can be split amongst any number of Robust instances. This allows them to be run on entirely separate machines if necessary. In this mode, the OpenSim.exe acts solely as the region server, serving one or more regions that communicate with the separate data services. At this point you can run multiple OpenSim.exe region simulators on different machines.&lt;br /&gt;
&lt;br /&gt;
[[Image:Opensim-grid-simple.png|frame|center|OpenSimulator running in grid mode. In this case, all the services are being run within a Robust.exe process. Multiple copies of OpenSim.exe (usually running on different machines) all use the same set of common services.]]&lt;br /&gt;
&lt;br /&gt;
Running in grid mode is more complicated than running in standalone mode. It requires an understanding of UUID, X,Y location, server handshake passwords, estates and estate owners, and a couple of other settings. These require more care and patience to set up. We strongly recommend that you don't attempt this unless you are extremely patient and very technically proficient.&lt;br /&gt;
&lt;br /&gt;
= Running OpenSimulator in Standalone mode =&lt;br /&gt;
&lt;br /&gt;
Binary distributions of OpenSimulator are by default configured to run in standalone mode.&lt;br /&gt;
&lt;br /&gt;
However, if you build OpenSimulator from the source distribution or from the git repository then you will need to:&lt;br /&gt;
&lt;br /&gt;
# Change into the '''''bin''''' folder&lt;br /&gt;
# Copy the file '''''OpenSim.ini.example''''' to '''''OpenSim.ini'''''. This configures the 3D simulator itself.&lt;br /&gt;
# Change into the '''''bin/config-include''''' folder&lt;br /&gt;
# Copy the file '''''StandaloneCommon.ini.example''''' to '''''StandaloneCommon.ini'''''. This configures the in-process data services used by the standalone configuration.&lt;br /&gt;
# In the '''[Architecture]''' section of '''''OpenSim.ini''''', near the bottom of the file, uncomment the ''Standalone.ini'' line. To uncomment a line of code, remove the semi-colon (;) comment symbol preceding the line so that it says:&lt;br /&gt;
&lt;br /&gt;
 Include-Architecture = &amp;quot;config-include/Standalone.ini&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running OpenSimulator is then a matter of launching OpenSim.exe. However, you need to have installed all dependencies before that. See [[Dependencies]] for details. After that, open a command prompt (for Windows users, Start menu &amp;gt; Run &amp;gt; cmd) and navigate to the Opensim /bin directory.&lt;br /&gt;
&lt;br /&gt;
On a '''Windows 32-bit''' command prompt:&lt;br /&gt;
 OpenSim.exe&lt;br /&gt;
Under '''Windows 64-bit''', ODE cannot yet be compiled for 64 bit mode, so if using the default ODE physics plugin run:&lt;br /&gt;
 OpenSim.32BitLaunch.exe&lt;br /&gt;
On '''Linux''' run:&lt;br /&gt;
 mono OpenSim.exe&lt;br /&gt;
This can be done under both 32 and 64 bit modes with the ODE physics engine.&lt;br /&gt;
&lt;br /&gt;
== Running for the first time ==&lt;br /&gt;
&lt;br /&gt;
If you're running OpenSimulator for the first time, it will ask you several questions at the console that will set up a single region for you. The configuration options you enter will be written to the bin/Regions/Regions.ini file, which you can then edit at a later date if you need to make changes.&lt;br /&gt;
&lt;br /&gt;
Many of the questions have defaults. Here are some explanations of the questions asked:&lt;br /&gt;
&lt;br /&gt;
* '''New region name'''&lt;br /&gt;
::The name for your region. Don't leave this blank!&lt;br /&gt;
* '''Region UUID'''&lt;br /&gt;
::The unique ID of your region. In pretty much all cases you will want to accept the randomly generated default in the square brackets. The only time when you wouldn't is if you were trying to set up a configuration to point to pre-existing region data. But in this case you are probably better off editing the Regions.ini file directly anyway&lt;br /&gt;
* '''Region Location'''&lt;br /&gt;
::This is the location of the region on the grid. In standalone mode you can safely leave these as the default (1000,1000). If you were to set up additional regions later on in Regions.ini then they would need different grid co-ordinates (e.g. 1000,1001). OpenSimulator regions can be placed anywhere on a 65536 by 65536 grid, but [[Hypergrid]] enabled regions may need special consideration for region location. See [[Installing and Running Hypergrid#The 4096 Regions Limit]] for more information.&lt;br /&gt;
* '''Internal IP address'''&lt;br /&gt;
::In virtually all cases this can be left as 0.0.0.0 (this is a wildcard that allows OpenSimulator to listen for UDP connections on any of the server's network interfaces). If you want to restrict UDP connections to only one network interface then you can specify an explicit IP address. This address is only used internally - the '''External host name''' is the one that is actually passed to the viewer (and hence is the important one).&lt;br /&gt;
* '''Internal port'''&lt;br /&gt;
::This is the IP port for all incoming client connections. The name is a bit misleading since it will be used externally (by a Second Life viewer, for instance) as well as internally. You can make this any port you want, but it is safe to leave at the default 9000. Each region on your server must have a unique port.&lt;br /&gt;
* '''Allow alternate ports'''&lt;br /&gt;
::This is currently experimental. Please leave it at the default of False.&lt;br /&gt;
* '''External host name'''&lt;br /&gt;
::If you leave this at the default 'SYSTEMIP' then this will become the LAN network address of the machine (e.g. 192.168.1.2). This is fine if you are connecting only from within your LAN. If you want to connect to it from a client on the internet, this should be the External IP Address of your router. Fully Qualified Domain Names (FQDNs) can also be used though they will be converted to a numeric IP address before being sent to the viewer.&lt;br /&gt;
&lt;br /&gt;
The following details are also asked in OpenSimulator 0.6.9 and earlier.&lt;br /&gt;
&lt;br /&gt;
* '''Master Avatar UUID'''&lt;br /&gt;
::This is a legacy OpenSimulator feature and can be left at the default of 00000000-0000-0000-0000-000000000000. Later on, you may want to change this to your own avatar's UUID in Regions.ini if you have problems editing terrain.&lt;br /&gt;
* '''Master Avatar first name'''&lt;br /&gt;
::This is an alternative way of specifying the master avatar by avatar name rather than UUID. If you press enter here then both this field and the last name field will be left blank. Accepting the blank default is fine - this can always be changed later in Regions.ini file.&lt;br /&gt;
* '''Master Avatar last name'''&lt;br /&gt;
::The last name of the master avatar.&lt;br /&gt;
* '''Master Avatar sandbox password'''&lt;br /&gt;
::The password of the master avatar.&lt;br /&gt;
&lt;br /&gt;
In OpenSimulator 0.7 and later, OpenSimulator will ask you to assign each region to an estate during the setup process. If an estate needs to be created then it will also ask you to assign an estate manager. In standalone mode, an estate manager can also be created during the setup process.&lt;br /&gt;
&lt;br /&gt;
Don't forget the account details you use to set up the master avatar (in 0.6.9) or the estate manager (in 0.7 and later). Only this user will initially be able to configure the in-world settings for your region. This is also a user account that you can use to perform your initial login test.&lt;br /&gt;
&lt;br /&gt;
See [[Configuring Regions]] for more information about the Regions.ini file that these questions generate.&lt;br /&gt;
&lt;br /&gt;
If you want to create a user other than the estate manager, then in the server console type:&lt;br /&gt;
&lt;br /&gt;
 create user&lt;br /&gt;
&lt;br /&gt;
This will ask you a series of questions for creating a user (such as first name, last name and password).&lt;br /&gt;
&lt;br /&gt;
== Network access for the standalone installation ==&lt;br /&gt;
In standalone mode, a viewer connecting to your installation needs the following network access to your installation machine.&lt;br /&gt;
&lt;br /&gt;
1. TCP over the http_listener_port as used in your simulator.  This is set in the [Network] section of your OpenSim.ini.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[Network]&lt;br /&gt;
http_listener_port = 9000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will be the default of 9000 if you have not explicitly changed it.&lt;br /&gt;
&lt;br /&gt;
2. UDP over each region's InternalPort as configured in your region files (such as Regions.ini).  For instance, if you have configured&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[test]&lt;br /&gt;
RegionUUID = dd5b77f8-bf88-45ac-aace-35bd76426c81&lt;br /&gt;
Location = 1000,1000&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9000&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = mygrid.com&lt;br /&gt;
&lt;br /&gt;
[test2]&lt;br /&gt;
RegionUUID = dd5b77f8-bf88-45ac-aace-35bd76426c82&lt;br /&gt;
Location = 1000,1001&lt;br /&gt;
InternalAddress = 0.0.0.0&lt;br /&gt;
InternalPort = 9001&lt;br /&gt;
AllowAlternatePorts = False&lt;br /&gt;
ExternalHostName = mygrid.com&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then you will need to open ports 9000 and 9001 to UDP traffic.&lt;br /&gt;
&lt;br /&gt;
3. The network address of the machine hosting the OpenSimulator installation must be accessible to connecting viewers.  In the example above, the installation machine is reachable from the Internet via the domain name &amp;quot;mygrid.com&amp;quot;.  If the same installation needs to be accessed by viewers on the same network, it must be possible for them to also successfully resolve that domain name (not all routers, especially home routers, have this &amp;quot;loopback capability&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If the installation only needed to be accessed on the same LAN, then one could you the local IP address of the server (e.g. 192.168.1.2).&lt;br /&gt;
&lt;br /&gt;
== Connecting to a standalone installation ==&lt;br /&gt;
&lt;br /&gt;
To connect to your new sim with your user, start up a Second Life viewer with the following command line switches:&lt;br /&gt;
&lt;br /&gt;
'''Client on same machine as OpenSim:'''&lt;br /&gt;
 -loginuri http://127.0.0.1:9000&lt;br /&gt;
&lt;br /&gt;
'''Client on same LAN as OpenSim:'''&lt;br /&gt;
 -loginuri http://lan_ip:9000&lt;br /&gt;
&lt;br /&gt;
'''Client on different machine or internet:'''&lt;br /&gt;
 -loginuri http://external_ip:9000&lt;br /&gt;
&lt;br /&gt;
Then enter the user name and password you set up in the previous step and your new user should login.&lt;br /&gt;
&lt;br /&gt;
Be aware of [http://osgrid.org/forums/viewtopic.php?f=5&amp;amp;t=400&amp;amp;start=0&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a loopback] problems when Running viewer &amp;amp;amp; server(s) on the same machine (LAN) by using the &amp;quot;external&amp;quot; configuration. (&amp;lt;u&amp;gt;'''You might notice endless waiting for region handshake'''&amp;lt;/u&amp;gt;.) See also [[Troubleshooting|troubleshoot hints]]. If you're having Connectivity problems, [[Network Settings|be sure to read the Network Configuration Page]]. This is important if you see Region handshake issue.&lt;br /&gt;
&lt;br /&gt;
[[Image:Exclamation.png|left]]&lt;br /&gt;
== IMPORTANT NOTE, DIVA DISTRO - 4 Apr. 2012  - ==&lt;br /&gt;
&lt;br /&gt;
'''If you download the latest version of diva-r18611.tar.bz''', it is necessary to first launch the setup program ''configure.exe''&lt;br /&gt;
*In Linux or MacOSX : open a terminal and enter &amp;quot;mono /diva-r18611/bin/Configure.exe&amp;quot; (assuming that you have placed the Diva distro in /diva-r18611)&lt;br /&gt;
*In Windows, assuming they extracted Diva in My Documents, one would open &amp;quot;Run =&amp;gt; cmd&amp;quot; and enter '''cd &amp;quot;%USERPROFILE%\My Documents\diva-r18611\&amp;quot;'', followed by &amp;quot;Configure.exe&amp;quot;. &lt;br /&gt;
After issuing the command, you can set your sim's domain name, and carefully answer the program's questions, then start the program as instructed in above paragraphs.&lt;br /&gt;
&lt;br /&gt;
The program will install the optimum configuration for OpenSim, example: '''&amp;lt;nowiki&amp;gt;http://&amp;lt;your_IP&amp;gt;:9000&amp;lt;/nowiki&amp;gt;''' and WiFi '''&amp;lt;nowiki&amp;gt;http:&amp;lt;your_IP&amp;gt;:9000/wifi&amp;lt;/nowiki&amp;gt;''' &lt;br /&gt;
In the standalone version, four regions will be set up. You can optionally add other regions later on, so make sure to use the same first name with the addition of a number &lt;br /&gt;
(ex: &amp;quot;region 5&amp;quot;, &amp;quot;region 6&amp;quot;, &amp;quot;region 7&amp;quot;, etc. otherwise you can't enter the region and you'd be placed in the nearest free location.&lt;br /&gt;
&lt;br /&gt;
 If you wish to enter a different region name, make sure that the &amp;quot;distance&amp;quot; between the island created by the Wifi configuration program and the next, &lt;br /&gt;
 will be at least 40 positions away from the first installed region)&lt;br /&gt;
 (command console: create region Johnnyland RegionConfigure.ini)&lt;br /&gt;
&lt;br /&gt;
= Running OpenSimulator in Grid mode =&lt;br /&gt;
{|&lt;br /&gt;
| style=&amp;quot;background:LavenderBlush; color:black&amp;quot; |&lt;br /&gt;
[[Image:Exclamation.png|left]]&lt;br /&gt;
NOTE: 0.7 is the first OpenSimulator release that fully migrates all services to the ROBUST server shell.  OpenSim.Grid.UserServer.exe and MessageServer.exe from OpenSimulator 0.6.9 are no longer necessary.  Please see the [[0.7 Release|0.7 release notes]] for more details.  For details on how to set up grid services in OpenSimulator 0.6.9 and earlier please see [[OpenSim 0.6.9 Grid Mode Configuration]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Running OpenSimulator in grid mode is considerably more complicated than running a standalone instance. Instead of running everything in the same process, backend data services (asset, inventory, etc.) run in one or more separate processes, often on a different machine. This allows multiple OpenSim.exe simulator instances to use the same asset and inventory data.&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set up a ROBUST services instance ==&lt;br /&gt;
&lt;br /&gt;
1. In the bin directory, copy Robust.ini.example to Robust.ini. The example file is configured to run all the services in a single ROBUST instance.&lt;br /&gt;
&lt;br /&gt;
2. Configure the [[Database Settings]] in Robust.ini to use your MySQL database. Only MySQL is supported for running grid services.  &lt;br /&gt;
&lt;br /&gt;
3. Start up Robust.exe. &lt;br /&gt;
&lt;br /&gt;
 mono Robust.exe (Linux, BSD, Mac OS X)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Robust.exe (Windows)&lt;br /&gt;
&lt;br /&gt;
If you don't see any errors (in red) on the console then you can move on to the next step.&lt;br /&gt;
&lt;br /&gt;
4. Every region must belong to an estate, and every estate must have an owner which is a valid user account in OpenSim's user account service. Create a user on the ROBUST command console with the following command.&lt;br /&gt;
&lt;br /&gt;
 create user&lt;br /&gt;
&lt;br /&gt;
This will ask you for the user's name, password and an optional e-mail. Remember this name since you will need it when you start up the simulator for the first time.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Configure an OpenSim.exe to use the ROBUST services ==&lt;br /&gt;
&lt;br /&gt;
In grid mode, as in standalone mode, you need to configure OpenSim.ini which controls the 3D simulator itself.&lt;br /&gt;
&lt;br /&gt;
However, instead of using and configuring the file config-include/StandaloneCommon.ini, a simulator connecting to a grid needs to use and configure the config-include/GridCommon.ini file, in order to connect to the ROBUST hosted remote data services rather than in-process local ones.&lt;br /&gt;
&lt;br /&gt;
The steps for both these operations are as follows.&lt;br /&gt;
&lt;br /&gt;
1. Copy bin/OpenSim.ini.example to OpenSim.ini&lt;br /&gt;
&lt;br /&gt;
2. Find the [Architecture] section at the very bottom of OpenSim.ini. Make sure that one of the following lines is uncommented:&lt;br /&gt;
&lt;br /&gt;
 Include-Architecture = &amp;quot;config-include/Grid.ini&amp;quot; (in OpenSimulator 0.7.1 and later)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 Include-Grid         = &amp;quot;config-include/Grid.ini&amp;quot; (in OpenSimulator 0.7.0.2 and earlier)&lt;br /&gt;
&lt;br /&gt;
The others should remain commented.&lt;br /&gt;
&lt;br /&gt;
3. Go to bin/config-include and copy GridCommon.ini.example to GridCommon.ini.&lt;br /&gt;
&lt;br /&gt;
4. Open GridCommon.ini in a text editor. You will see lots of URL entries, each of which have dummy defaults of http://myassetserver.com:8003, http://myinventoryserver.com:8003, etc. You will need to change each of these to point towards the address of your ROBUST instance. For instance, if you're running ROBUST on a machine with a local IP address of 192.168.1.2, you will need to change AssetServerURI to the setting&lt;br /&gt;
&lt;br /&gt;
 AssetServerURI = &amp;quot;http://192.168.1.2:8003&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Run OpenSim.exe. If you're running OpenSim.exe for the first time you will get the same questions about setting up the region that occur on a first-run in standalone mode. Please see the standalone section for instructions on how to answer these, or read more information about the Regions.ini file on the [[Configuring Regions]] page.&lt;br /&gt;
&lt;br /&gt;
If everything is set up correctly, when starting up OpenSim.exe you shouldn't see any errors. You should also see the ROBUST console display log lines saying that the region has registered with the grid service. For example,&lt;br /&gt;
&lt;br /&gt;
 21:43:45 - [GRID SERVICE]: Region t1 (176cc95e-f693-4b02-8e08-af86e2372faa) registered successfully at 256000-256000&lt;br /&gt;
 21:43:47 - [GRID SERVICE]: region t1 has 0 neighbours&lt;br /&gt;
&lt;br /&gt;
== Network access for a grid installation ==&lt;br /&gt;
In standalone mode, a viewer connecting to your installation needs to access&lt;br /&gt;
&lt;br /&gt;
# The login service over TCP and other configured public services (e.g. grid info, map).&lt;br /&gt;
# The http_server_port of each configured simulator over TCP.&lt;br /&gt;
# The InternalPort and ExternalHostName of each configured region.&lt;br /&gt;
&lt;br /&gt;
The last two requirements are the same as for standalone installations, except that they apply to each server that hosts a simulator.  Please see the standalone section above for more details.&lt;br /&gt;
&lt;br /&gt;
The login service is a little different.  Whereas in standalone this uses the same http_server_port as the simulator itself, in grid mode it's running in a separate ROBUST service.&lt;br /&gt;
&lt;br /&gt;
The default port for the login service is 8002.  You can see this used in the [ServiceList] section of Robust.ini.example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[ServiceList]&lt;br /&gt;
AssetServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AssetServiceConnector&amp;quot;&lt;br /&gt;
InventoryInConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:XInventoryInConnector&amp;quot;&lt;br /&gt;
GridServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridServiceConnector&amp;quot;&lt;br /&gt;
GridInfoServerInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector&amp;quot;&lt;br /&gt;
AuthenticationServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector&amp;quot;&lt;br /&gt;
OpenIdServerConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector&amp;quot;&lt;br /&gt;
AvatarServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector&amp;quot;&lt;br /&gt;
LLLoginServiceInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector&amp;quot;&lt;br /&gt;
PresenceServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector&amp;quot;&lt;br /&gt;
UserAccountServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector&amp;quot;&lt;br /&gt;
GridUserServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector&amp;quot;&lt;br /&gt;
FriendsServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector&amp;quot;&lt;br /&gt;
MapAddServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector&amp;quot;&lt;br /&gt;
MapGetServiceConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here all the public services (those where the viewer connects directly to the service) are served on port 8002, with internal services on 8003.  So you need to make sure that the viewer can access port 8002 over TCP but you do not want to expose port 8003.  Only simulators need to be able to connect to port 8003.&lt;br /&gt;
&lt;br /&gt;
== Connecting to a grid installation ==&lt;br /&gt;
&lt;br /&gt;
Your client startup line will look something like&lt;br /&gt;
&lt;br /&gt;
 -loginuri http://mygrid.com:8002&lt;br /&gt;
&lt;br /&gt;
The loginuri needs to be the address to the login service. In standalone mode, this was the same address as the region simulator and the port was 9000 by default. However, in grid mode it will be the address to login service hosted on the ROBUST instance. In this case, the address will be 192.168.1.2. The port number of 8002 is the traditional one for the grid login service and is the default in Robust.ini.example.&lt;br /&gt;
&lt;br /&gt;
If the login is successful, you will see log lines on the ROBUST console (for the login itself) and then log lines on the region simulator console (as the login process tells the simulator to expect the avatar, tells the viewer the address of the region simulator and then when the viewer starts talking to the simulator directly).&lt;br /&gt;
&lt;br /&gt;
= Running multiple ROBUST service instances =&lt;br /&gt;
&lt;br /&gt;
If you are operating a grid, then you can run different services (e.g. asset, inventory) in different ROBUST instances, in order to spread the load.  To do this, you will need to edit the ServiceConnectors parameter in the [Startup] section of Robust.ini (or Robust.HG.ini if you're running Hypergrid).  The default ServiceConnectors parameter looks something like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[ServiceList]&lt;br /&gt;
AssetServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AssetServiceConnector&amp;quot;&lt;br /&gt;
InventoryInConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:XInventoryInConnector&amp;quot;&lt;br /&gt;
GridServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridServiceConnector&amp;quot;&lt;br /&gt;
GridInfoServerInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector&amp;quot;&lt;br /&gt;
AuthenticationServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector&amp;quot;&lt;br /&gt;
OpenIdServerConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector&amp;quot;&lt;br /&gt;
AvatarServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector&amp;quot;&lt;br /&gt;
LLLoginServiceInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector&amp;quot;&lt;br /&gt;
PresenceServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector&amp;quot;&lt;br /&gt;
UserAccountServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector&amp;quot;&lt;br /&gt;
GridUserServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector&amp;quot;&lt;br /&gt;
FriendsServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector&amp;quot;&lt;br /&gt;
MapAddServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector&amp;quot;&lt;br /&gt;
MapGetServiceConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each entry has the form &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;port-number&amp;gt;/&amp;lt;dll&amp;gt;:&amp;lt;connector-class-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For instance, the first entry above&lt;br /&gt;
&lt;br /&gt;
 8003/OpenSim.Server.Handlers.dll:AssetServiceConnector&lt;br /&gt;
&lt;br /&gt;
says to start an AssetServiceConnector (and hence an asset service) from the OpenSim.Server.Handlers.dll and to server that from port 8003.&lt;br /&gt;
&lt;br /&gt;
By default, Robust.exe loads a configuration file with the same name but with .ini appended instead of .exe.  So Robust.exe will look for an inifile called Robust.ini.  You can change this by giving the parameter on the commandline.  For instance, to start Robust with HG parameters, one would use&lt;br /&gt;
&lt;br /&gt;
 Robust.exe -inifile=Robust.HG.ini&lt;br /&gt;
&lt;br /&gt;
So if you wanted to run every connector apart from assets in one instance of ROBUST and the asset connector in another instance, you would have two ini files.  One could remain Robust.ini and have&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[ServiceList]&lt;br /&gt;
InventoryInConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:XInventoryInConnector&amp;quot;&lt;br /&gt;
GridServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridServiceConnector&amp;quot;&lt;br /&gt;
GridInfoServerInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector&amp;quot;&lt;br /&gt;
AuthenticationServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector&amp;quot;&lt;br /&gt;
OpenIdServerConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector&amp;quot;&lt;br /&gt;
AvatarServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector&amp;quot;&lt;br /&gt;
LLLoginServiceInConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector&amp;quot;&lt;br /&gt;
PresenceServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector&amp;quot;&lt;br /&gt;
UserAccountServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector&amp;quot;&lt;br /&gt;
GridUserServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector&amp;quot;&lt;br /&gt;
FriendsServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector&amp;quot;&lt;br /&gt;
MapAddServiceConnector = &amp;quot;8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector&amp;quot;&lt;br /&gt;
MapGetServiceConnector = &amp;quot;8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The other could be called Robust.Assets.ini and have&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ini&amp;quot;&amp;gt;&lt;br /&gt;
[ServiceList]&lt;br /&gt;
AssetServiceConnector = &amp;quot;8004/OpenSim.Server.Handlers.dll:AssetServiceConnector&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this is using port 8004 instead of port 8003.  This is necessary since only one executable can use each port at a time.  You will need to make sure your simulator configuration files use port 8004 for the asset service as well.&lt;br /&gt;
&lt;br /&gt;
You will also need to change the default network port to 8004 for this second copy of Robust.exe&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[Network]&lt;br /&gt;
   port = 8004&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've created the two ROBUST configuration files (Robust.ini containing all services apart from asset and Robust.Assets.ini containing only the asset service), then you could start the first Robust.exe as usual.&lt;br /&gt;
&lt;br /&gt;
 Robust.exe&lt;br /&gt;
&lt;br /&gt;
This will load Robust.ini, as we haven't specified a Robust.ini.  Also, the logfile it will use will be Robust.log as we haven't manually specified one.&lt;br /&gt;
&lt;br /&gt;
The second ROBUST instance we would start with&lt;br /&gt;
&lt;br /&gt;
 Robust.exe -inifile=Robust.Assets.ini -logfile=Robust.Assets.log&lt;br /&gt;
&lt;br /&gt;
The -inifile switch tells the second Robust instance to load it's configuration from Robust.Assets.ini rather than Robust.ini.  The -logfile switch tells Robust.exe to use Robust.Assets.log as its logfile rather than the default Robust.log.  If you don't specify this switch then you may see errors on the console about a locked log file.&lt;br /&gt;
&lt;br /&gt;
At this point you should have two running Robust.exe instances.&lt;br /&gt;
&lt;br /&gt;
If you put the ROBUST instances on different machines then don't forget to change the relevant service URIs in each simulator to match.&lt;br /&gt;
&lt;br /&gt;
Since OpenSimulator services are stateless (e.g. every request is unconnected with other requests as long as they affect the same persistent data where necessary), you can also load balance by starting more than one ROBUST instance with a copy of the same service (e.g. multiple asset services using the same database).  Requests would be round-robined between the service copies using an HTTP reverse proxy implementation (e.g. nginx).  See [[Performance#Services]] for more details.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
[http://opensimulator.org/pipermail/opensim-users/2012-October/011099.html Useful discussion about separating Robust instances]&lt;br /&gt;
&lt;br /&gt;
= Attaching your sim to someone else's grid =&lt;br /&gt;
&lt;br /&gt;
To set up the region server (i.e., &amp;lt;tt&amp;gt;OpenSim.exe&amp;lt;/tt&amp;gt;) to connect to an external grid, follow the [[Configuration#Step 2: Configure an OpenSim.exe to use the ROBUST services]] instructions above.&lt;br /&gt;
&lt;br /&gt;
The grid will have already provided with the required services. In step 2 you will need to use the provided URLs for their services.&lt;br /&gt;
&lt;br /&gt;
In your bin/Regions.ini file (or other region config file) you will also need to set the grid co-ordinates to your regions provided from the grid operator. See [[Configuring Regions]] for more information.&lt;br /&gt;
&lt;br /&gt;
= Running an OpenSimulator standalone or grid installation with Hypergrid enabled =&lt;br /&gt;
[[Hypergrid]] is an emerging architecture supported by OpenSimulator that allows a user with an account on one standalone or grid to visit other Hypergrid-enabled standalones or grids, and for users from those grids to visit the home grid. This does not require the two installations to share a central set of data services (assets, inventory, etc.). Please see [[Installing and Running Hypergrid]] for more details.&lt;br /&gt;
&lt;br /&gt;
= Further notes =&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
See [[Troubleshooting]] &lt;br /&gt;
&lt;br /&gt;
== Running OpenSimulator 0.6.7 to 0.7.6.1 in 64 bit Windows ==&lt;br /&gt;
[[Image:Exclamation.png|left]]&lt;br /&gt;
As of OpenSimulator 0.6.7 and up to release 0.7.6.1, the default physics engine for OpenSimulator was changed to the ODE engine. This is because ODE was the most advanced physics engine plugin at the time in OpenSimulator. Unfortunately, it has the drawback in that its library is not compilable under 64-bit in Windows. &lt;br /&gt;
&lt;br /&gt;
Therefore, in order to launch the region simulator under 64-bit Windows for versions 0.6.7 to 0.7.6.1 using ODE, users may need to run: &lt;br /&gt;
&lt;br /&gt;
 OpenSim.32BitLaunch.exe&lt;br /&gt;
&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
 OpenSim.exe&lt;br /&gt;
&lt;br /&gt;
An alternative is to use the basicphysics engine instead or one of the other alternative physics engines bundled with OpenSim, though all these were less functional than the ODE plugin.&lt;br /&gt;
&lt;br /&gt;
From OpenSim 0.8 the default physics engine is BulletSim.&lt;br /&gt;
&lt;br /&gt;
== Note About Mono ==&lt;br /&gt;
&lt;br /&gt;
Mono and .NET have a built in threadpool.  By default, OpenSimulator is instead configured to use a third-party threadpool called SmartThreadPool for many tasks, partly because of issues with early implementations of the Mono threadpool.&lt;br /&gt;
&lt;br /&gt;
However, even with this setting, some other operations are carried out with the built-in threadpool.  At least in some versions of Mono (chiefly prior to 2.6), the default configuration for this can cause issues with OpenSimulator - [http://www.mono-project.com/ThreadPool_DeadLocks ThreadPool_Deadlocks at the mono-project website].&lt;br /&gt;
&lt;br /&gt;
If this is an issue or if the threadpool runs out of available threads, then the operation of your sim will start to break in all sorts of different ways. A common symptom is the freezing of all activity upon login of a new avatar.&lt;br /&gt;
&lt;br /&gt;
The MONO_THREADS_PER_CPU parameter affects the number of existing built-in threadpool worker threads below which Mono will always spawn a new thread when OpenSimulator adds a new task.  This is MONO_THREADS_PER_CPU * 4.  So if set to 50, the minimum number of worker threads will be 200.&lt;br /&gt;
&lt;br /&gt;
Above this number, Mono will make an internal decision whether to spawn a new thread or wait for an existing thread to complete its task.&lt;br /&gt;
&lt;br /&gt;
The effect of this parameter is extremely implementation dependent, and so dependent upon the version of Mono that you are using.  Before 2.6 for instance, it was definitely worth setting a high MONO_THREADS_PER_CPU due to issues with the Mono thread pool.  In theory, later versions of Mono should not be susceptible to this issue.  Mono 2.10.8.1, for instance, has a default MONO_THREADS_PER_CPU of 1 (despite what the incorrect Mono manpage says).&lt;br /&gt;
&lt;br /&gt;
However, people still report a benefit from setting MONO_THREADS_PER_CPU higher than default.  The exact number depends on many factors including: the number of CPUs in your machine, what else you use that machine for, how many regions you have in your sim, how many of them are adjacent, how many scripts you have, and how many avatars you expect to serve at the same time. As a reference, Wright Plaza in OSGrid, which is running as a single region on a sim and routinely hosts meetings with 20 avatars, uses the value 125. &lt;br /&gt;
&lt;br /&gt;
For example: $ export MONO_THREADS_PER_CPU=125&lt;br /&gt;
&lt;br /&gt;
So if you are having problems with avatars freezing and you're hardware meets or exceeds recommended [[Performance]] requirements, then you may want to setting this environment variable.&lt;br /&gt;
&lt;br /&gt;
There is a very basic program for displaying current threadpool configuration settings at https://github.com/justincc/opensimulator-tools/tree/master/analysis/threadpool-info.  &lt;br /&gt;
&lt;br /&gt;
All this applies to the min threadpool numbers, not the max thread numbers.  OpenSimulator itself will attempt to adjust the max numbers.  You can see the output from this very near the top of the OpenSim.log file.&lt;br /&gt;
&lt;br /&gt;
== Increasing the stack reserve level when using OpenDynamicsEngine on *nix ==&lt;br /&gt;
&lt;br /&gt;
If you have problems using the OpenDynamicsEngine on *nix, try setting your stack reserve level higher than the default with the following command;&lt;br /&gt;
&amp;lt;tt&amp;gt;ulimit -s 262144&amp;lt;/tt&amp;gt; Or, run the opensim-ode.sh to start up OpenSimulator.&lt;br /&gt;
&lt;br /&gt;
== Firewalls ==&lt;br /&gt;
Some operation systems or distributions run their own firewall by default. If you can't access to OpenSimulator from remote client, you'll need to check their settings. See [[Firewall Settings]] for details.&lt;br /&gt;
&lt;br /&gt;
== Legacy Configuration Information ==&lt;br /&gt;
These are some pages containing some legacy configuration information of unknown accuracy.&lt;br /&gt;
&lt;br /&gt;
[[OpenSim 0.6.6 legacy configuration information]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional Optional Configuration Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Further configure OpenSimulator ===&lt;br /&gt;
If you've looked through OpenSim.ini.example or any other of the config files, you'll see that there's a very large number of configurable parameters spread across multiple files. See [[Configuring Simulator Parameters]] for more details about the configuration infrastructure and how settings in identically named sections (e.g. [XEngine]) are merged by OpenSimulator on loading.&lt;br /&gt;
&lt;br /&gt;
=== Set up a second region to run on the same simulator ===&lt;br /&gt;
See [[Configuring Regions]].&lt;br /&gt;
&lt;br /&gt;
=== Run Multiple Standalone Instances of OpenSimulator on the Same Server ===&lt;br /&gt;
For each subsequent instance of OpenSim, change the 'http_listener_port' in OpenSim.ini to the value excluding 9000, and 'InternalPort' in Regions.ini to the value excluding 9000. Also, make sure your regions are using different ports, as explained in [[Configuring Regions]].&lt;br /&gt;
&lt;br /&gt;
=== Load region content ===&lt;br /&gt;
You can load content onto regions by using the [[OpenSim Archives|load oar command]]. To load individual OAR files into each region, use the 'change region [regionname]' command and then 'load oar [oar-location]'.&lt;br /&gt;
&lt;br /&gt;
=== OpenSim.exe command line options ===&lt;br /&gt;
OpenSim.exe has command line options which allow you to perform actions such as reading configuration files from a different directory. See [[OpenSim.exe Command Line Options]] for more details.&lt;br /&gt;
&lt;br /&gt;
=== Script engine ===&lt;br /&gt;
OpenSimulator supports multiple script engines. See [[ScriptEngines]] for details. If you don't know what this means then the default script engine will be fine. In fact, recent versions of OpenSimulator only ship with one script engine, the XEngine.&lt;br /&gt;
&lt;br /&gt;
=== Permissions Configuration ===&lt;br /&gt;
OpenSimulator has a quite elaborate set of permissions. See [[Permissions (Server)]] for details. By default, permissions are active on region simulators.&lt;br /&gt;
&lt;br /&gt;
=== Logging ===&lt;br /&gt;
By default, OpenSimulator logs information to a file called OpenSim.log in the bin directory. See [[Logging]] for details on how to further configure this if required.&lt;br /&gt;
&lt;br /&gt;
=== Set up other optional modules ===&lt;br /&gt;
* [[IRCBridgeModule]]&lt;br /&gt;
* [[Freeswitch Module]]&lt;br /&gt;
* [[Offline Messaging]]&lt;br /&gt;
* [[Enabling Groups]]&lt;br /&gt;
* See also [[User_Documentation#Setup]]&lt;br /&gt;
&lt;br /&gt;
=== Configuration of Web Server and Pages ===&lt;br /&gt;
OpenSimulator contains a web server that can serve up a variety of pages. Some which come from external files and some are generated internally.&lt;br /&gt;
* [[External Files]]&lt;br /&gt;
* [[Internally Generated]]&lt;br /&gt;
&lt;br /&gt;
= Where to go from here =&lt;br /&gt;
&lt;br /&gt;
* [[NAT Loopback Routers]] Router and Nat Loopback Information&lt;br /&gt;
&lt;br /&gt;
* [[Upgrading]] from an old OpenSimulator version to a newer one.&lt;br /&gt;
&lt;br /&gt;
* [[Server Commands]] for creating users and controlling the system.&lt;br /&gt;
&lt;br /&gt;
* Fix the bent knees bug: [[FAQ#Why are my knees bent when I stand idle.3F]]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* [http://dist.opensimulator.org/wiki/opensim-standalone.odg OpenOffice draw file for OpenSimulator standalone diagram]&lt;br /&gt;
* [http://dist.opensimulator.org/wiki/opensim-grid-simple.odg OpenOffice draw file for OpenSimulator grid diagram]&lt;br /&gt;
&lt;br /&gt;
[[Category:Configuration]]&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/0.7_Release</id>
		<title>0.7 Release</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/0.7_Release"/>
				<updated>2013-11-07T13:53:28Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* Hypergrid changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Release Notes =&lt;br /&gt;
&lt;br /&gt;
== Major changes from 0.6.x ==&lt;br /&gt;
&lt;br /&gt;
Release 0.7 features the completed major refactoring and rearchitecting work that happened during the second half of 2009 and the first quarter of 2010. This work targeted mainly the resource services and servers previously known as UGAIM. These servers have been replaced by one single server shell called [[ROBUST]] which can now run any combination of services in it.&lt;br /&gt;
&lt;br /&gt;
The standard opensim release includes configuration files for two deployment architectures:&lt;br /&gt;
&lt;br /&gt;
* The standalone deployment consists in having both the simulator and the services in one single process, OpenSim.exe, configured by OpenSim.ini (and included .inis under bin/config-include).&lt;br /&gt;
* The grid deployment has 1 ROBUST server process (Robust.exe) running all services, configured by Robust.ini (or Robust.HG.ini); and one or more simulators (OpenSim.exe), each configured by OpenSim.ini (and included .ini files under bin/config-include).&lt;br /&gt;
&lt;br /&gt;
Users and distributors of OpenSimulator can deviate from these pre-existing configurations in many ways. Specifically, large grids will benefit from splitting the single ROBUST server into several ROBUST servers, each running a collection of services. Instructions for how to do that are found elsewhere. (Think of the ROBUST server as an Apache server, to which you can load service modules)&lt;br /&gt;
&lt;br /&gt;
The services themselves have been reconceptualized; we now have the following set of main services: &lt;br /&gt;
&lt;br /&gt;
* Assets -- the asset store &lt;br /&gt;
* Authentication -- passwords and auth tokens &lt;br /&gt;
* Authorization -- access control &lt;br /&gt;
* Avatar -- the visual representation of users, formerly known as &amp;quot;avatar appearance&amp;quot; &lt;br /&gt;
* FreeSwitch -- voice &lt;br /&gt;
* Friends -- social net &lt;br /&gt;
* Gatekeeper -- hypergrid foreign users control &lt;br /&gt;
* Grid -- maps map locations to IPs and regions &lt;br /&gt;
* Grid User -- grid-local information about users &lt;br /&gt;
* Inventory -- the inventory store &lt;br /&gt;
* Login -- the login service &lt;br /&gt;
* Presence -- tracks where in the grid user agents are &lt;br /&gt;
* User Accounts -- administrative info about users &lt;br /&gt;
* User Agents -- hypergrid local users protection&lt;br /&gt;
&lt;br /&gt;
The simulators access these services through abstract interfaces, therefore being isolated from implementation details. The services are seamlessly instantiated as plugins in any process, namely ROBUST server shells and the simulators processes themselves, which means that we have complete reuse of service code between standalone and grid configurations. The plugin specification is done in configuration files (.ini). Moreover, access to remote services is also seamlessly achieved through the instantiation of stubs (aka service connectors) as plugins; again, the specification of which stubs the simulators use is done externally in configuration files (.ini).&lt;br /&gt;
&lt;br /&gt;
This layering allows for alternative third-party implementations of the entire resource service infrastructure without having to affect one line of code in the simulator, and simply using different ini files. Starting in this release, there is an alternative infrastructure to Robust: [http://code.google.com/p/openmetaverse/ SimianGrid], a project separate from OpenSimulator. The standard OpenSimulator release includes simulator's connectors and configuration files for the SimianGrid, but that infrastructure is not distributed with OpenSim, only Robust is.&lt;br /&gt;
&lt;br /&gt;
== Database changes ==&lt;br /&gt;
&lt;br /&gt;
[[File:DB-0.7.jpg|400px|right|(click to enlarge)]]&lt;br /&gt;
&lt;br /&gt;
[[File:DB-0.7-old-tables.jpg|400px|right|(click to enlarge)]]&lt;br /&gt;
&lt;br /&gt;
The database schema has changed considerably from previous releases. The top picture on the right shows the entire set of tables for a clean installation of the 0.7 release with MySql. The bottom picture shows the new tables as well as the tables that existed in previous versions of OpenSimulator and that are now obsolete, stroked in red. OpenSimulator does not drop the old tables automatically, for obvious reasons. Once you are sure your data migration was successful, you can then drop the obsolete tables manually.&lt;br /&gt;
&lt;br /&gt;
In the picture on top, the tables are grouped into 2 catalogs, the service-db and the simulator-db, corresponding to the data managed by the resource services (the ConnectionString under the [DatabaseService] section) and the data managed by the simulators (the connection_string under [Startup] section), respectively. &lt;br /&gt;
&lt;br /&gt;
As before, you have a lot of freedom to define how the data is organized, so, for example you might have one single catalog with all the tables (like the organization shown in the picture on the bottom). In any case, after a clean installation of release 0.7, there should be all these tables in your DB.&lt;br /&gt;
&lt;br /&gt;
For SQLite, the tables are split among several .db files under the bin directory. Here are the SQLite .db files that a clean install of 0.7 should produce:&lt;br /&gt;
&lt;br /&gt;
 $ ls -l *.db&lt;br /&gt;
 ----------+ 1 crista None 6555648 Jun 14 08:15 Asset.db&lt;br /&gt;
 ----------+ 1 crista None  564224 Jun 14 08:15 OpenSim.db&lt;br /&gt;
 ----------+ 1 crista None    5120 Jun 14 08:15 auth.db&lt;br /&gt;
 ----------+ 1 crista None    4096 Jun 14 08:14 avatars.db&lt;br /&gt;
 ----------+ 1 crista None    4096 Jun 14 08:14 friends.db&lt;br /&gt;
 ----------+ 1 crista None    4096 Jun 14 08:14 griduser.db&lt;br /&gt;
 ----------+ 1 crista None   26624 Jun 14 08:15 inventory.db&lt;br /&gt;
 ----------+ 1 crista None       0 Jun 14 08:14 inventoryStore.db&lt;br /&gt;
 ----------+ 1 crista None    4096 Jun 14 08:15 userprofiles.db&lt;br /&gt;
&lt;br /&gt;
With SQLite, the simulator data is in OpenSim.db; the service data is in all the other files. inventoryStore.db has to do with migrations of inventory from older OpenSimulator releases; on a fresh install, this file is created but is has no data, you can safely delete it afterward.&lt;br /&gt;
&lt;br /&gt;
== Hypergrid changes ==&lt;br /&gt;
&lt;br /&gt;
The Hypergrid underwent considerable changes to make it more secure. 0.7 features HG1.5, an interoperability design that is as secure as it can be while continuing to assume the use of the regular Linden viewer. Here are the highlights with respect to security.&lt;br /&gt;
&lt;br /&gt;
'''HG Teleports: The Gateway'''&lt;br /&gt;
&lt;br /&gt;
HG teleports are now done through the Gateway service, as opposed to being done directly between the departing and the receiving simulators. The flow is like this: user U is in sim A of grid G1, and wants to HG TP to sim B of grid G2; sim A posts the user agent to the Gateway service of G2; after verifying a few things, and making sure this is a genuine agent for user U, the Gateway service in G2 logs in the user's presence in the local grid as a valid grid user, and posts the agent to sim B; sim B in G2 then contacts Sim A in G1 telling it it can delete the agent; at that point sim2 logs off user U from G1.&lt;br /&gt;
&lt;br /&gt;
The posting of foreign agents directly to simulators of a grid, without passing through the Gateway, will fail.&lt;br /&gt;
&lt;br /&gt;
In 0.7, the Gateway is still not performing authorization (i.e. access control for foreign users based on grid-specific policies), but that step is now possible, and will be introduced in a future release.&lt;br /&gt;
&lt;br /&gt;
'''User Agents Verification'''&lt;br /&gt;
&lt;br /&gt;
Prior to 0.7, it was possible to impersonate users by launching agents at simulators pretending to be those users. This vulnerability was independent of the Hypergrid being active or not, it affected all publicly available simulators. With 0.7 and beyond, and for grids where all simulators are under the same authority, this vulnerability has been eliminated.&lt;br /&gt;
&lt;br /&gt;
HG1.5 includes pieces of protocol that guarantee that the user agent being launched at the Gatekeeper of a grid is indeed a genuine agent from the claimed user.&lt;br /&gt;
&lt;br /&gt;
'''Inventory Access'''&lt;br /&gt;
&lt;br /&gt;
The important thing to know about the family of viewers deriving from the Linden viewer is that they all access the user's inventory from the simulator that the user is currently on. In other words, they expect the simulators to proxy inventory, instead of accessing inventory directly from the user's inventory service. This poses serious security and privacy issues that can only be minimized but not eliminated. HG1.5 minimizes the risks as much as they can be minimized while allowing users to access their inventory everywhere. This comes at the cost of a slight UI mismatch at points.&lt;br /&gt;
&lt;br /&gt;
First, in HG1.0, the visiting simulator had the power to delete items from the user's inventory and even delete the entire user inventory. That vulnerability has been eliminated. Foreign simulators cannot delete anything from the user's inventory: &amp;quot;purge&amp;quot; actions from a foreign simulator are ignored by the user's home inventory service. This means that if the user performs a genuine &amp;quot;purge&amp;quot; while in a foreign sim, the viewer will show that the items have been purged, but upon the next login those items will be in the Trash bin again, because they weren't really deleted.&lt;br /&gt;
&lt;br /&gt;
Second, upon arrival at a foreign simulator that simulator is not given the user's root inventory folder. Instead, it is given another folder called Suitcase that will act as root folder while the user is visiting. As such, the simulator cannot recursively download the user's inventory; it can only 'see' the items and folder under the Suitcase folder. (No need to create a Suitcase folder, it will be created if it doesn't exist)&lt;br /&gt;
&lt;br /&gt;
Besides the Suitcase folder, the only items that the simulator will know about upon user's arrival are those pertaining to the user's current appearance. 'Knowing about' means that a rogue simulator can copy them; but it can never delete them, as explained above.&lt;br /&gt;
&lt;br /&gt;
Because inventory access is dictated by the viewer (i.e. by the user's actions), privacy of inventory depends on what actions the user does while visiting foreign grids. If the user does not access his/her inventory, the visiting simulator will know very little about it -- only the things stated above. On the other extreme, searching for an inventory item or opening up the texture picker makes the viewer query the entire user inventory, sending to the simulator all folder identifiers one by one; this means that the visiting simulator will 'see' the entire inventory; rogue simulators may then copy the items (again, they cannot delete them).&lt;br /&gt;
&lt;br /&gt;
While using the Linden family of viewers, HG users should be aware of these issues. Trust decisions, ultimately, fall on them. If users trust the visiting grid, they can access their inventory without worrying that it will be stolen; if, however, the users don't know much about the simulator that they are visiting, they can still visit but should abstain from performing inventory actions.&lt;br /&gt;
&lt;br /&gt;
== Groups Changes ==&lt;br /&gt;
&lt;br /&gt;
The groups module can use a PHP XmlRpc server from:&lt;br /&gt;
&lt;br /&gt;
* Flotsam project at http://code.google.com/p/flotsam/&lt;br /&gt;
* SimianGrid project at http://code.google.com/p/openmetaverse&lt;br /&gt;
&lt;br /&gt;
The same GroupsServerURI configuration variable is used for either. 0.6.x setups using the old XmlRpcServiceURL configuration variable should be changed to use GroupsServerURI as illustrated in Opensim.ini.example.&lt;br /&gt;
&lt;br /&gt;
== Profile Changes ==&lt;br /&gt;
&lt;br /&gt;
The profile feature has been discontinued from the core distribution. 3rd-party addons provide different flavors of support for this feature.&lt;br /&gt;
&lt;br /&gt;
== Bug Fixes, New Features and Assorted Changes ==&lt;br /&gt;
&lt;br /&gt;
* Impovements to sculptmap and level of detail handling.&lt;br /&gt;
* Standalone database configuration simplified.&lt;br /&gt;
* Parcel and estate bans&lt;br /&gt;
* Neighboring regions being brought up and down results in correct accessibility in the connected clients.&lt;br /&gt;
* Friends online/offline notifications are now working across the board.&lt;br /&gt;
* Object attach/drop/attach correctly working.&lt;br /&gt;
* Inventory folder 'wear' working correctly.&lt;br /&gt;
* Inventory accept/decline notifications working correctly.&lt;br /&gt;
* Eliminated deadlock affecting scripts startup. This deadlock showed more often in certain mono versions. The same code was responsible for a CPU spike at region startup, which is now under control.&lt;br /&gt;
* Megaregion prims now in place after unclean shutdown. They used to be missing.&lt;br /&gt;
* Several permissions vulnerabilities fixed.&lt;br /&gt;
* Allow use of old angle rules PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE in llParticleSystem().&lt;br /&gt;
* Bug fix in llRot2Euler()&lt;br /&gt;
* llVecNorm() now returns a zero-length vector when one is supplied as input.&lt;br /&gt;
* Fixed problem where &amp;quot;Adult&amp;quot; regions were reported as being of type &amp;quot;Unknown&amp;quot;&lt;br /&gt;
* Fixed Copy on Ray, Drag Copy and other little things.&lt;br /&gt;
* Make drag copy and copy-on-ray handle friends list perms properly.&lt;br /&gt;
* Added checks to XInventory DB layer to truncate names and descriptions, so they fit their sizes in the DB.&lt;br /&gt;
* Guarded prioritizer agains null values as those produced by a bullet dying before it can be updated&lt;br /&gt;
* Security fix: Allow only textures to be fetched using HTTP texture cap&lt;br /&gt;
* Fixed faulty profile cut parameter checking in llSetPrimitiveParams()&lt;br /&gt;
* Fixed attachments coming back upon being detached in neighbouring regions and crossing.&lt;br /&gt;
* Added CHANGED_TELEPORT event trigger upon inter-sim teleports.&lt;br /&gt;
* Prevented region crossings from screwing up complex attachments by preserving link numbers.&lt;br /&gt;
* Added ability to load IARs directly from URIs&lt;br /&gt;
* Added prim prioritization according to several schemes (configurable)&lt;br /&gt;
* Fixed spamming the assets table with map tiles.&lt;br /&gt;
* Corrected an invalid construction of Primitive.TextureEntry&lt;br /&gt;
* Added LightShare scripting&lt;br /&gt;
* Added SimianGrid connectors&lt;br /&gt;
* &amp;quot;Share with group&amp;quot; implemented for object inventory items. This only works if you're using a groups module with OpenSimulator.&lt;br /&gt;
* Added HTTP texture retrieval.&lt;br /&gt;
* Fixes to allow Linden Lab's viewer 2 to work, though some new features of this viewer (e.g. shared media/media on a prim) are not yet implemented.&lt;br /&gt;
* Added --skip-assets option to load oar command. This allows an oar to be loaded without loading its assets, which can be quicker if the assets are already known to be in the database.&lt;br /&gt;
* Various core performance improvements.&lt;br /&gt;
* Various core stability improvements.&lt;br /&gt;
&lt;br /&gt;
* Master Avatar no longer in use. Upon creation of a new region, the user is prompted for the region owner and estate information. In standalone configurations, the region owner account is created if it doesn't exist; in grid configurations, the region owner account must already have been created.&lt;br /&gt;
&lt;br /&gt;
= Upgrading from older releases =&lt;br /&gt;
&lt;br /&gt;
Upgrading the database from older releases is done automatically when OpenSimulator 0.7 is first run; no special provisions are required. However, we very strongly recommend that you backup your database first, in case something goes wrong during the migration process.&lt;br /&gt;
&lt;br /&gt;
Configuration files, on the other hand, have changed in 0.7 compared with 0.6 versions. Simply copying old configuration files can result in strange errors. We recommend that you start afresh with the OpenSim.ini.example and example files in bin/config-include and manually move accross any changes that you've made to the default configuration.&lt;br /&gt;
&lt;br /&gt;
== Standalone Deployments ==&lt;br /&gt;
&lt;br /&gt;
For standalones, there is no noticeable difference in the mode of operation. The main configuration file is OpenSim.ini, as before; make sure it exists and that is readable. If you are upgrading from 0.6.[7-8-9], you should already know about config-include/StandaloneCommon.ini. If you are upgrading from older releases, please be aware that this additional configuration file is needed. Make sure it exists and that it is readable. There are .example files for both of these. &lt;br /&gt;
&lt;br /&gt;
There were several changes and additions to the configuration files. As such, it is better that you start with the given .example files and customize from them, as opposed to upgrading your existing ini files.&lt;br /&gt;
&lt;br /&gt;
== Grid Deployments ==&lt;br /&gt;
&lt;br /&gt;
The deployment model for grids has changed considerably, as explained before, so you need to acquire the know-how for operating in this post-0.7 model. The most important change is this: '''none of the UGAIM servers exist any longer'''; they have been replaced by one single server shell, Robust.exe, configured by one single configuration file, Robust.ini (or Robust.HG.ini). There are .example files provided. Copy one of them, and make the appropriate customizations. Robust does not depend on OpenSim.ini, only on Robust.ini.&lt;br /&gt;
&lt;br /&gt;
 Robust.exe -inifile=Robust.HG.ini&lt;br /&gt;
 or&lt;br /&gt;
 Robust.exe -inifile=Robust.ini&lt;br /&gt;
&lt;br /&gt;
On the simulators' side, the operation is the same as before. The main configuration file is OpenSim.ini, as before; make sure it exists and that is readable. If you are upgrading from 0.6.[7-8-9], you should already know about config-include/GridCommon.ini. If you are upgrading from older releases, please be aware that this additional configuration file is needed. Make sure it exists and that it is readable. There are .example files for both of these. &lt;br /&gt;
&lt;br /&gt;
It is better that you start with the given .example files and customize from them, as opposed to upgrading your existing ini files.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
When migrations fail, the migration number is incremented anyway. If one of your migrations fail, notice which number it was, and to which table it pertained to. Then, login to the DB and set the version number of the corresponding store to the number just before the failed migration. &lt;br /&gt;
&lt;br /&gt;
For example, if there is a failure in migration 8 for the assets table, issue this command in the DB:&lt;br /&gt;
 &amp;gt; UPDATE Migrations SET version=7 WHERE name='AssetStore';&lt;br /&gt;
Then run Robust/OpenSim again.&lt;br /&gt;
&lt;br /&gt;
The very last resort is to perform the migration manually, i.e. login to the DB server and issue the offending statement directly there.&lt;br /&gt;
&lt;br /&gt;
See also [http://opensimulator.org/mantis/view.php?id=4875 this bug report] for useful tips related to account migration problems.&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Console-less_OpenSim</id>
		<title>Console-less OpenSim</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Console-less_OpenSim"/>
				<updated>2013-10-09T14:07:05Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Quicklinks}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
== Background ==&lt;br /&gt;
OpenSimulator uses consoles for each service it's running. It was already possible to run the services(UGAIMR) in the background, while still being able to access the consoles. On Linux we used the convenient screen tool for this. The ideal situation would be though, to run most commands from an external source like a webportal. The region service has an XMLRPC interface, that's called remote admin. While remote admin offers controls to some extent, it's still impossible to let's say shutdown the region service, and restart it from a webpage. This would require a seperate xmlrpc daemon, which has control over the OpenSimulator services. In python, it's quite easy to make such a xmlrpc daemon as you will see below.&lt;br /&gt;
&lt;br /&gt;
== Concepts ==&lt;br /&gt;
XMLRPC is a powerful, yet simple protocol that's supported by most scripting languages. From all scripting languages, python has the best options to actually create a standalone daemon, that can handle remote xmlrpc calls. With such a standalone daemon, it's simple to link systemcommands to xmlrpc calls. Each simulator would have such a daemon, allowing the controling webportal(like WiXTD) to issue commands to each daemon. This would allow total control from a webportal, like service rebooting, rolling restarts, rolling updates, ugaim on/off, etc. Currently the code below doesn't have any security, but it can be extended to be really secure(SSL, host-based dispatching). It's focussed on a linux platform at the moment, but can be easily modified to work on a windows platform as well.&lt;br /&gt;
&lt;br /&gt;
== MooRPC ==&lt;br /&gt;
This code is part of the moo-package on the forge. The script depends on the following custom libraries: [http://pycurl.sourceforge.net/ pycurl], [http://twistedmatrix.com/trac/ twisted], [http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/ daemon] and [http://www.voidspace.org.uk/python/configobj.html confObj]. It also uses linux-commands, screen and the directory-structure from Moo currently. You're free to modify the code.&lt;br /&gt;
&lt;br /&gt;
== Source ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
# MooRPC, XMLRPC controller for WiXTD&lt;br /&gt;
# BSD-Licensed&lt;br /&gt;
# Copyright (c) &amp;lt;2009&amp;gt;, &amp;lt;Jeroen van Veen, OS-Networks&amp;gt;&lt;br /&gt;
# All rights reserved.&lt;br /&gt;
#&lt;br /&gt;
# Redistribution and use in source and binary forms, with or without&lt;br /&gt;
# modification, are permitted provided that the following conditions are met:&lt;br /&gt;
# * Redistributions of source code must retain the above copyright&lt;br /&gt;
# notice, this list of conditions and the following disclaimer.&lt;br /&gt;
# * Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
# notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
# documentation and/or other materials provided with the distribution.&lt;br /&gt;
# * Neither the name of the &amp;lt;organization&amp;gt; nor the&lt;br /&gt;
# names of its contributors may be used to endorse or promote products&lt;br /&gt;
# derived from this software without specific prior written permission.&lt;br /&gt;
#&lt;br /&gt;
# THIS SOFTWARE IS PROVIDED BY &amp;lt;OS-Networks&amp;gt; ``AS IS'' AND ANY&lt;br /&gt;
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED&lt;br /&gt;
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;br /&gt;
# DISCLAIMED. IN NO EVENT SHALL &amp;lt;OS-Networks&amp;gt; BE LIABLE FOR ANY&lt;br /&gt;
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES&lt;br /&gt;
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;&lt;br /&gt;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND&lt;br /&gt;
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT&lt;br /&gt;
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&lt;br /&gt;
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
from twisted.web import xmlrpc, server&lt;br /&gt;
from twisted.internet import reactor&lt;br /&gt;
import socket, os, sys, time, xmlrpclib, pycurl&lt;br /&gt;
import xmlrpclib, pycurl&lt;br /&gt;
import subprocess&lt;br /&gt;
sys.path.append(&amp;quot;./lib&amp;quot;)&lt;br /&gt;
from daemon import Daemon&lt;br /&gt;
from configobj import ConfigObj&lt;br /&gt;
&lt;br /&gt;
try:&lt;br /&gt;
    import signal&lt;br /&gt;
    from signal import SIGPIPE, SIG_IGN&lt;br /&gt;
    signal.signal(signal.SIGPIPE, signal.SIG_IGN)&lt;br /&gt;
except ImportError:&lt;br /&gt;
    pass&lt;br /&gt;
try:&lt;br /&gt;
    from cStringIO import StringIO&lt;br /&gt;
except ImportError:&lt;br /&gt;
    from StringIO import StringIO&lt;br /&gt;
&lt;br /&gt;
class CURLTransport(xmlrpclib.Transport):&lt;br /&gt;
    xmlrpc_h = [ &amp;quot;Content-Type: text/xml&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
    def __init__(self, username=None, password=None):&lt;br /&gt;
        self.c = pycurl.Curl()&lt;br /&gt;
        self.c.setopt(pycurl.POST, 1)&lt;br /&gt;
        self.c.setopt(pycurl.NOSIGNAL, 1)&lt;br /&gt;
        self.c.setopt(pycurl.CONNECTTIMEOUT, 30)&lt;br /&gt;
        self.c.setopt(pycurl.HTTPHEADER, self.xmlrpc_h)&lt;br /&gt;
        if username != None and password != None:&lt;br /&gt;
            self.c.setopt(pycurl.USERPWD, '%s:%s' % (username, password))&lt;br /&gt;
        self._use_datetime = False&lt;br /&gt;
&lt;br /&gt;
    def request(self, host, handler, request_body, verbose=0):&lt;br /&gt;
        b = StringIO()&lt;br /&gt;
        self.c.setopt(pycurl.URL, 'http://%s%s' % (host, handler))&lt;br /&gt;
        self.c.setopt(pycurl.POSTFIELDS, request_body)&lt;br /&gt;
        self.c.setopt(pycurl.WRITEFUNCTION, b.write)&lt;br /&gt;
        self.c.setopt(pycurl.VERBOSE, verbose)&lt;br /&gt;
        self.verbose = verbose&lt;br /&gt;
        try:&lt;br /&gt;
           self.c.perform()&lt;br /&gt;
        except pycurl.error, v:&lt;br /&gt;
            raise xmlrpclib.ProtocolError(&lt;br /&gt;
                host + handler,&lt;br /&gt;
                v[0], v[1], None&lt;br /&gt;
                )&lt;br /&gt;
        b.seek(0)&lt;br /&gt;
        return self.parse_response(b)&lt;br /&gt;
&lt;br /&gt;
class OSAdmin(xmlrpc.XMLRPC):&lt;br /&gt;
    config = ConfigObj('settings.ini')&lt;br /&gt;
    radminhost = config['RPC']['radminhost']&lt;br /&gt;
    radminpw = config['RPC']['radminpw']&lt;br /&gt;
    radminGW = xmlrpclib.ServerProxy(radminhost,transport=CURLTransport())    &lt;br /&gt;
    def xmlrpc_admin_broadcast(self,message): &lt;br /&gt;
     return self.radminGW.admin_broadcast({&amp;quot;password&amp;quot;: self.radminpw,   &amp;quot;message&amp;quot;: message})       &lt;br /&gt;
    def xmlrpc_admin_create_region(self,region_id,region_name,region_x,region_y,listen_port,region_master_first,region_master_last,region_master_password,listen_ip,external_address,allow_alternate_ports,lastmap_uuid,lastmap_refresh):     &lt;br /&gt;
     return self.radminGW.admin_create_region({&amp;quot;password&amp;quot;: self.radminpw,&amp;quot;region_id&amp;quot;: region_id,&amp;quot;region_name&amp;quot;: region_name,&amp;quot;region_x&amp;quot;:region_x,&amp;quot;region_y&amp;quot;:region_y,&amp;quot;listen_port&amp;quot;:listen_port,&amp;quot;region_master_first&amp;quot;:region_master_first,&amp;quot;region_master_last&amp;quot;:region_master_last,&amp;quot;region_master_password&amp;quot;:region_master_password,&amp;quot;listen_ip&amp;quot;:listen_ip,&amp;quot;external_address&amp;quot;:external_address,&amp;quot;allow_alternate_ports&amp;quot;:allow_alternate_ports,&amp;quot;lastmap_uuid&amp;quot;:lastmap_uuid,&amp;quot;lastmap_refresh&amp;quot;:lastmap_refresh})       &lt;br /&gt;
    def xmlrpc_admin_delete_region(self,region_name):     &lt;br /&gt;
     return self.radminGW.admin_delete_region({&amp;quot;password&amp;quot;: self.radminpw,&amp;quot;region_name&amp;quot;: region_name})       &lt;br /&gt;
    def xmlrpc_admin_shutdown(self):     &lt;br /&gt;
     return self.radminGW.admin_shutdown({&amp;quot;password&amp;quot;: self.radminpw}) &lt;br /&gt;
    def xmlrpc_admin_region_query(self,region_name):     &lt;br /&gt;
     return self.radminGW.admin_region_query({&amp;quot;password&amp;quot;: self.radminpw,&amp;quot;region_name&amp;quot;: region_name})               &lt;br /&gt;
    def xmlrpc_start_simulator(self): &lt;br /&gt;
     os.chdir('/opt/opensim/simulator')&lt;br /&gt;
     cmd = &amp;quot;screen -dmS simulator mono /opt/opensim/simulator/OpenSim.exe&amp;quot;&lt;br /&gt;
     os.system(cmd)&lt;br /&gt;
    def xmlrpc_ping_simulator(self):&lt;br /&gt;
     try:&lt;br /&gt;
      print self.radminGW.admin_simhealth({&amp;quot;password&amp;quot;: self.radminpw})&lt;br /&gt;
     except xmlrpclib.Error, v:&lt;br /&gt;
      if str(v)[1:14] == &amp;quot;ProtocolError&amp;quot;:&lt;br /&gt;
       return 0&lt;br /&gt;
      elif str(v)[1:14] == &amp;quot;Fault -32601:&amp;quot;:&lt;br /&gt;
       return 1&lt;br /&gt;
      else:&lt;br /&gt;
       return 0&lt;br /&gt;
    def xmlrpc_stop_ugaim(self): &lt;br /&gt;
     cmd = &amp;quot;screen -S user -p 0 -X stuff $'shutdown\n'&amp;quot;&lt;br /&gt;
     os.system(cmd)&lt;br /&gt;
     cmd = &amp;quot;screen -S grid -X -p 0 stuff $'shutdown\n'&amp;quot;&lt;br /&gt;
     os.system(cmd)  &lt;br /&gt;
     cmd = &amp;quot;screen -S asset -X -p 0 stuff $'shutdown\n'&amp;quot;&lt;br /&gt;
     os.system(cmd)    &lt;br /&gt;
     cmd = &amp;quot;screen -S inventory -p 0 -X stuff $'shutdown\n'&amp;quot;&lt;br /&gt;
     os.system(cmd) &lt;br /&gt;
     cmd = &amp;quot;screen -S messaging -p 0 -X stuff $'shutdown\n'&amp;quot;&lt;br /&gt;
     os.system(cmd)        &lt;br /&gt;
    def xmlrpc_start_ugaim(self): &lt;br /&gt;
     os.chdir('/opt/opensim/simulator')&lt;br /&gt;
     cmd = &amp;quot;screen -dmS user mono /opt/opensim/simulator/OpenSim.Grid.UserServer.exe&amp;quot;&lt;br /&gt;
     os.system(cmd) &lt;br /&gt;
     time.sleep(4)         &lt;br /&gt;
     cmd = &amp;quot;screen -dmS grid mono /opt/opensim/simulator/OpenSim.Grid.GridServer.exe&amp;quot;&lt;br /&gt;
     os.system(cmd)&lt;br /&gt;
     time.sleep(3)&lt;br /&gt;
     cmd = &amp;quot;screen -dmS asset mono /opt/opensim/simulator/OpenSim.Grid.AssetServer.exe&amp;quot;&lt;br /&gt;
     os.system(cmd)&lt;br /&gt;
     time.sleep(3)&lt;br /&gt;
     cmd = &amp;quot;screen -dmS inventory mono /opt/opensim/simulator/OpenSim.Grid.InventoryServer.exe&amp;quot;&lt;br /&gt;
     os.system(cmd) &lt;br /&gt;
     cmd = &amp;quot;screen -dmS messaging mono /opt/opensim/simulator/OpenSim.Grid.MessagingServer.exe&amp;quot;&lt;br /&gt;
     os.system(cmd)                             &lt;br /&gt;
    def xmlrpc_ping_ugaim(self): &lt;br /&gt;
     os.chdir('/opt/opensim/simulator')&lt;br /&gt;
     cmd = &amp;quot;screen -dmS simulator mono /opt/opensim/simulator/OpenSim.exe&amp;quot;&lt;br /&gt;
     os.system(cmd)          &lt;br /&gt;
    def xmlrpc_ping(self):&lt;br /&gt;
     return 1         &lt;br /&gt;
    def xmlrpc_fault(self):&lt;br /&gt;
        raise xmlrpc.Fault(123, &amp;quot;The fault procedure is faulty.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class RPCDaemon(Daemon):&lt;br /&gt;
    def run(self):&lt;br /&gt;
     reactor.listenTCP(9996, server.Site(OSAdmin()))&lt;br /&gt;
     reactor.run()&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
	daemon = RPCDaemon('/tmp/rpcMoo.pid')&lt;br /&gt;
	if len(sys.argv) == 2:&lt;br /&gt;
		if 'start' == sys.argv[1]:&lt;br /&gt;
			daemon.start()&lt;br /&gt;
		elif 'stop' == sys.argv[1]:&lt;br /&gt;
			daemon.stop()&lt;br /&gt;
		elif 'restart' == sys.argv[1]:&lt;br /&gt;
			daemon.restart()&lt;br /&gt;
		else:&lt;br /&gt;
			print &amp;quot;Unknown command&amp;quot;&lt;br /&gt;
			sys.exit(2)&lt;br /&gt;
		sys.exit(0)&lt;br /&gt;
	else:&lt;br /&gt;
		print &amp;quot;usage: %s start|stop|restart&amp;quot; % sys.argv[0]&lt;br /&gt;
		sys.exit(2)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Performance</id>
		<title>Performance</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Performance"/>
				<updated>2013-10-09T14:03:37Z</updated>
		
		<summary type="html">&lt;p&gt;Joe Radik: /* Monitoring Performance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Quicklinks}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
OpenSimulator 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.&lt;br /&gt;
&lt;br /&gt;
We can break down performance considerations into &lt;br /&gt;
&lt;br /&gt;
# Network issues (bandwidth and latency between viewer and simulator, between simulators and between simulator and grid service).&lt;br /&gt;
# Simulator issues (e.g. number of scene objects, number of textures, number of scripts).&lt;br /&gt;
# Grid issues (chiefly scaling services such as asset, inventory, etc to serve more simulators and users).&lt;br /&gt;
&lt;br /&gt;
The biggest issues are probably network and simulator issues.  &lt;br /&gt;
&lt;br /&gt;
To run a simulator you must have good bandwidth (to download textures), good latency (so that movements are seen and actions processed in a timely manner) and good quality (so that random packet drops don't result in missed actions or other problems).&lt;br /&gt;
&lt;br /&gt;
You must also be aware of your hardware's capabilities.  The more scene objects, scripts and avatars you have, the more memory and CPU will be used.&lt;br /&gt;
&lt;br /&gt;
Grid issues are less important until you reach larger grid sizes (e.g. over 60 simultaneous users).&lt;br /&gt;
&lt;br /&gt;
= General Tips =&lt;br /&gt;
&lt;br /&gt;
* Where at all possible, don't assume something is a performance bottleneck, measure it!  You might think your asset database is large, for example, but even large asset database seldom cause real issues.&lt;br /&gt;
* Make as many objects phantom as possible.  Phantom objects do not need to be tested for collisions with avatars and other objects, reducing physics frame time and increasing performance.&lt;br /&gt;
* Make as few objects subject to physics (e.g. falling under gravity, movable by other avatars) as possible.  Physics objects need a lot more collision testing than ordinary non-phantom objects.&lt;br /&gt;
* It can be hard to perform measurement at the moment since not a lot of tools exist.  However, one such is [[pCampbot]] which is bundled with OpenSimulator.  This can instantiate a number of simultaneous libomv clients on a simulator that can take certain actions such as clicking things and bouncing aroud.  Apects of it (e.g. appearance) are currently rather buggy and generate a lot of logging guff.&lt;br /&gt;
* If your avatars are twitching a lot or flying around uncontrollably, this is often a signal of dropped packets caused by network issues.  For important packets, the simulator will retry the send 3 times but drop the packet after that.  On the simulator console, the command &amp;quot;show queues&amp;quot; will indicate how many packets the simulator has to resend and the total number of sends.  If the total resends is greater than 10% then this is a signal of network issues, at least between a particular viewer and the simulator.  The problem may be at the user's end (e.g. a bad router being used over wifi, a badly performing ISP) which are difficult to do anything about!&lt;br /&gt;
&lt;br /&gt;
= Monitoring Performance =&lt;br /&gt;
&lt;br /&gt;
Gathering data to analyze performance issues is an evolving area.  We can split this into [[client side monitoring]] and server side performance analysis.  Server side performance analysis will involve OpenSimulator specific [[monitoring]] and general system tools (e.g. top on Linux to monitor which processes are taking up CPU/memory and more general monitoring tools such as Zabbix).&lt;br /&gt;
&lt;br /&gt;
= Viewer Performance Topics =&lt;br /&gt;
&lt;br /&gt;
Performance issues can be tackled on the viewer side as well as on the OpenSimulator side.  This typically involves lowering viewer graphical settings (e.g. reducing viewer-side draw distance).  See http://community.secondlife.com/t5/English-Knowledge-Base/How-to-improve-Viewer-performance/ta-p/1316923 for more information.&lt;br /&gt;
&lt;br /&gt;
= Simulator Performance Topics =&lt;br /&gt;
&lt;br /&gt;
== Hardware Requirements ==&lt;br /&gt;
Unfortunately, this is a very difficult question in light of all the factors mentioned in the introduction.  Apart from network, the most important &lt;br /&gt;
&lt;br /&gt;
===CPU===&lt;br /&gt;
We can say that OpenSimulator does not run well when it only has access to a single CPU core - you should regard a dual-core machine as the minimum.&lt;br /&gt;
&lt;br /&gt;
An extremely approximate rule of thumb is to have one core per regularly used region, with the minimum of two above.  So a 4 region simulator would need 4 cores.  However, this assumes continuous use of those regions - one could probably get away with a higher core to region ratio if those other regions were much less used (or not used simultaneously).&lt;br /&gt;
&lt;br /&gt;
===Memory===&lt;br /&gt;
As a rule of thumb, a region with lots of avatars, 15000 or more prims and 2000 scripts may require 1G of memory.  So a simulator with 4 such regions may require 4G.  One could use less memory if not all regions will be occupied with avatars simultaneously, or where the are fewer scripts, for instance.&lt;br /&gt;
&lt;br /&gt;
===Disk===&lt;br /&gt;
At the simulator level, storage performance is not a big issue unless one has scripts which need extremely high performance in rezzing and derezzing objects.  Even in this case, 7200 rpm 3.5&amp;quot; desktop drives are generally sufficient - problems only start to arise with lower performing drives, such as those found in laptops.&lt;br /&gt;
&lt;br /&gt;
At the grid level, faster storage may be useful when handling large numbers of asset, inventory or other service requests.&lt;br /&gt;
&lt;br /&gt;
===Network===&lt;br /&gt;
Download and upload bandwidth and latency are important.  The biggest use of upload bandwidth (from the server point of view) is to provide texture data to viewers.  So a home network with poor bandwidth (e.g. 384 kbits up) will result in a poor experience for viewers, at least until they have received all texture data.  So the requirement for upload bandwidth peaks when a viewer enters a region for the first time or after clearing their asset cache.  The amount of bandwidth required will vary heavily with the number of textures on the region.  An extremely approximate rule of thumb is to have 500 kbit per simultaneously logged in avatar.&lt;br /&gt;
&lt;br /&gt;
The biggest use of download bandwidth (from the server point of view) is to continuously receive movement messages from connected avatars.  However, in comparison to texture download, the bandwidth required is trivial - an approximate rule of thumb is 50 kbit per avatar.&lt;br /&gt;
&lt;br /&gt;
Latency is critical on both upload and download to the simulator, since any delay will affect avatar movement packets (download to server from viewer) and updates to the viewer about other object/avatar position changes (upload from server to viewer).  It's much harder to give advice here, though pings of greater than 350 milliseconds will start to degrade the user's experience on moving their avatar.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
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 recommendations.'''&lt;br /&gt;
&lt;br /&gt;
Object Parts ~= # prim&lt;br /&gt;
&lt;br /&gt;
Sensors and Timers are generally more intensive then regular scripts, so please specify quantity of each.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Description&lt;br /&gt;
!Operating System (please add Mono version if appropriate)&lt;br /&gt;
!OpenSimulator version&lt;br /&gt;
!RAM/AVG_USE_%&lt;br /&gt;
!CPU&lt;br /&gt;
!#/type of regions&lt;br /&gt;
!# simultaneous avs&lt;br /&gt;
!#scripts/timers/Sensors&lt;br /&gt;
!Location&lt;br /&gt;
!#objectparts&lt;br /&gt;
|-&lt;br /&gt;
|hosted Xen VPS&lt;br /&gt;
|Ubuntu Intrepid (8.10)&lt;br /&gt;
|Unknown&lt;br /&gt;
|540MB/?&lt;br /&gt;
|1x quad-core 2.5GHz Xeon (L5420)&lt;br /&gt;
|1 region + 9 voids&lt;br /&gt;
|generally 1-2&lt;br /&gt;
|few&lt;br /&gt;
|Knifejaw Atoll &amp;amp; surrounding on OSGrid&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|hosted Xen VPS&lt;br /&gt;
|Ubuntu Jaunty (9.04)&lt;br /&gt;
|Unknown&lt;br /&gt;
|360MB/?&lt;br /&gt;
|2x dual-core 2.0GHz Xeon (5130)&lt;br /&gt;
|1 void&lt;br /&gt;
|generally 1-2 &lt;br /&gt;
|none&lt;br /&gt;
|Knifejaw Road on OSGrid&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
|Dedicated Server from A+&lt;br /&gt;
|Windows Server 2003&lt;br /&gt;
|Unknown&lt;br /&gt;
|1 Meg&lt;br /&gt;
|1x single-core 2.8GHz Celeron&lt;br /&gt;
|2regions per server&lt;br /&gt;
|6 at once with no issues&lt;br /&gt;
|Waterfalls, texture anims, window texture switchers, lots of sound loops&lt;br /&gt;
|Pleasure Planet Welcome center &amp;amp; Region Pleasure Planet in OSGrid&lt;br /&gt;
|20000 prims per region&lt;br /&gt;
|-&lt;br /&gt;
|Amazon EC2 &amp;quot;high-CPU medium instance&amp;quot; (Xen VM)&lt;br /&gt;
|Windows Server 2003&lt;br /&gt;
|Unknown&lt;br /&gt;
|1.7GB&lt;br /&gt;
|1x dual-core 2.3GHz (Intel E5345)&lt;br /&gt;
|1 region with sailing race course&lt;br /&gt;
|7 avs, 4 in boats&lt;br /&gt;
|scripted start line&lt;br /&gt;
|Castle Rock, OSGrid&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Dedicated Server from simhost.com&lt;br /&gt;
|SuSe 11.2 x64&lt;br /&gt;
|Unknown&lt;br /&gt;
|8gb / 50%&lt;br /&gt;
|4x Core2Quad Q9300 2.6ghz&lt;br /&gt;
|1 region (Wright Plaza) uses approx 4gb ram&lt;br /&gt;
|20-25 users&lt;br /&gt;
|Freebie Stores / Meeting Center / Video Theater&lt;br /&gt;
|@osgrid.org Heavy Use Sim&lt;br /&gt;
|17500 prims aprox 1500 scripts&lt;br /&gt;
|-&lt;br /&gt;
|Home machine&lt;br /&gt;
|Windows XP SP3&lt;br /&gt;
|0.7.0.1 (Diva r13558)&lt;br /&gt;
|3GB / 15-40% incl. Opensim and MySQL&lt;br /&gt;
|4x Core2Quad Q6600 2.4 GHz. Use: generally, 0-10%&lt;br /&gt;
|11 regions&lt;br /&gt;
|1-6 users&lt;br /&gt;
|Many scripted objects (1934 scripts)&lt;br /&gt;
|[http://zonjacapalini.wordpress.com/2010/08/25/condensation-land-a-status-report/ Condensation Land]&lt;br /&gt;
|38,065 prims&lt;br /&gt;
|-&lt;br /&gt;
|Home machine&lt;br /&gt;
|Ubuntu Lucid 10.04 (32 bit pae)&lt;br /&gt;
|0.7.0.1 (Diva r13558)&lt;br /&gt;
|160Mb no users, add 5Mb/user incl Opensim and MySQL&lt;br /&gt;
|I7-920 (dual threaded quad core), 3.8Ghz, 6Gb RAM, 0-10% Load&lt;br /&gt;
|4 regions (Diva default config)&lt;br /&gt;
|1-4 users (approx 20Kb/sec bandwidth/user)&lt;br /&gt;
|Few scripted objects (&amp;lt;10)&lt;br /&gt;
|[http://mars-simulator.hobby-site.org:9000/wifi Mars Simulation]- Based on [http://metatek.blogspot.com/2010/06/mars-simulation-for-distribution.html Erik Nauman's Open Blackboard]&lt;br /&gt;
|158 prims&lt;br /&gt;
|-&lt;br /&gt;
|Hosted Dedicated OVH&lt;br /&gt;
|Suse 12.2&lt;br /&gt;
|0.7.0.2 (D2)&lt;br /&gt;
|420Mb total, incl OS, Opensim and MySQL&lt;br /&gt;
|i7 Quad 950 (Bloomfield) 3.07GHz, 8 Core, 24Gb RAM, 0-1% Avg Load&lt;br /&gt;
|16 regions (4x4 mega-region)&lt;br /&gt;
|&amp;lt;6 users&lt;br /&gt;
|vehicle scripted objects (&amp;lt;5)&lt;br /&gt;
|[http://metaversesailing.com:9000/wifi Metaverse Sailing]&lt;br /&gt;
|&amp;lt;1000 prims&lt;br /&gt;
|-&lt;br /&gt;
|VPS&lt;br /&gt;
|Debian Lenny 5 (mono 2.4.2.3)&lt;br /&gt;
|OSgrid 0.7.1 (Dev) cd4d7a7: 2010-10-15&lt;br /&gt;
|655MB average out of 1722MB RAM, incl. MySQL&lt;br /&gt;
|Intel Quadcore 2.5 Ghz (1 core assigned to vps) average use: 40-45% &lt;br /&gt;
|20 regions&lt;br /&gt;
|&amp;lt;4 users&lt;br /&gt;
|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&lt;br /&gt;
|Phoenix Rising Isles on OsGrid&lt;br /&gt;
|3727 prims&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
By default, OpenSimulator is configured to use the SQLite database.  This is very convenient for an out-of-the-box experience since it requires no configuration.  However, it's not designed for heavy usage, so if you build very quickly or have more than a few people on your simulator then you will start to see performance issues.&lt;br /&gt;
&lt;br /&gt;
Therefore, we recommend that you switch to MySQL as soon as possible.  This will provide a much better experience but will take a little bit of work to set up.  &lt;br /&gt;
&lt;br /&gt;
Unfortunately, tools for migrating OpenSimulator SQLite data to MySQL are currently limited.  Migration is also possible by saving OARs/IARs of your data from sqlite and loading them up once you've reconfigured to use MySQL.&lt;br /&gt;
&lt;br /&gt;
There is also a database plugin for MSSQL but this is not well maintained between OpenSimulator releases.&lt;br /&gt;
&lt;br /&gt;
In standalone mode, both services and the simulator itself can use SQLite.  In grid mode, SQLite is only supported for simulator data - the ROBUST instances must use a MySQL (or MSSQL) database.&lt;br /&gt;
&lt;br /&gt;
In general a single MySQL instance for the ROBUST services instance will serve small, medium and even large grids perfectly well - it's a configuration that's widely used for even quite large websites.&lt;br /&gt;
&lt;br /&gt;
== Configuration tweaks ==&lt;br /&gt;
&lt;br /&gt;
There are a couple of OpenSimulator configuration tweaks that you can do to significantly improve script loading performance in certain situations.  These tweaks can be made in your OpenSim.ini config file.  These apply to current OpenSimulator development code (0.7.3-dev) and may also apply to 0.7.2, though certainly not any earlier.&lt;br /&gt;
&lt;br /&gt;
===Set DeleteScriptsOnStartup = false===&lt;br /&gt;
&lt;br /&gt;
 [XEngine]&lt;br /&gt;
 DeleteScriptsOnStartup = false&lt;br /&gt;
&lt;br /&gt;
This means that OpenSimulator will not delete all the existing compiled script DLLs on startup (don't worry, this setting doesn't touch the actual LSL scripts in your region).  This will significantly improve startup performance.  However, if you upgrade OpenSimulator in place (e.g. you regularly update your installation directly from development code) then you may occasionally see problems if code changes and your previously compiled DLLs can't find their old references.&lt;br /&gt;
&lt;br /&gt;
In this case, you can either set DeleteScriptsOnStartup = true for one restart in order to clean out and recompile script DLLs or you can manually delete the relevant bin/ScriptEngines/&amp;lt;region-uuid&amp;gt;/*.dll.* files, which will force OpenSimulator to recompile them.  You could also delete the entire bin/ScriptEngines/&amp;lt;region-uuid&amp;gt; directory but this would lose all persisted script state (which is kept in the &amp;lt;script-item-id&amp;gt;.state files).&lt;br /&gt;
&lt;br /&gt;
===Set AppDomainLoading = false===&lt;br /&gt;
 [XEngine]&lt;br /&gt;
 AppDomainLoading = false&lt;br /&gt;
&lt;br /&gt;
By default, OpenSimulator loads every script DLL into its own AppDomain.  If this is set to false, then all scripts are loaded into OpenSimulator's default AppDomain instead.&lt;br /&gt;
&lt;br /&gt;
This will significantly improve script startup times and reduce initial per-script memory overhead.&lt;br /&gt;
&lt;br /&gt;
However, setting this to false will also prevent derezzed script DLLs from being removed from memory (only whole AppDomains can be unloaded).  This might cause an OutOfMemory problem over time, as avatars with scripted attachments move in and out of the region.  Whether this is a problem for you will depend on factors such as the avatar population of your grid.&lt;br /&gt;
&lt;br /&gt;
In addition, Windows users have reported script loading problems with AppDomainLoading = false, though I (justincc) haven't been able to replicate this with current OpenSimulator code on my WindowsXP machine.&lt;br /&gt;
&lt;br /&gt;
= Grid Performance Topics =&lt;br /&gt;
&lt;br /&gt;
Scaling a grid is a complex task and only for the very technically inclined.  It is also an area under active investigation.  The advice below will change considerably over time as OpenSimulator and its environment changes and we learn more about perfomrnace issues.&lt;br /&gt;
&lt;br /&gt;
When would you start to meet grid scaling issues?  As an extremely rough and really quite arbitrary and pessimistic rule of thumb, you will probably start to have to think about things when you exceed 50 regions containing a large number of prims or 50 simultaneous users with large inventories.  But this will very a tremendous amount depending on your situation.  If you have thousands of regions with very few prims that much more supportable than 50 regions with 45000 prims each.&lt;br /&gt;
&lt;br /&gt;
You are likely to encounter issues in two areas - database and services.&lt;br /&gt;
&lt;br /&gt;
== Database ==&lt;br /&gt;
&lt;br /&gt;
=== Assets ===&lt;br /&gt;
&lt;br /&gt;
==== The problem ====&lt;br /&gt;
&lt;br /&gt;
Due to the architecture of distributed architecture of OpenSimulator, where regions are running on a number of different machines over a network, it's extremely hard to identify assets that are not in use and hence can be deleted.  Equally, the fact that assets are immutable leads to continual growth in the asset database.&lt;br /&gt;
&lt;br /&gt;
In theory, one could identify unused assets if one could identify all references in simulators and in user inventory.  However, this is extremely hard to do where machines are distributed over a network.  If a grid only has a few simulators all running on machines that are controlled by the same entity running a grid, then it becomes a little more tractable but even then would almost certainly involve significant downtime.  For stand-alone grids, or for environments where assets are not passed between grids (ie: giving a texture to a friend on another grid) [http://was.fm Wizardry and Steamworks] provides an experimental script that will do exactly that. It is currently available at the [http://was.fm/opensim:database:asset_cleaner asset cleaner] project page and published under an MIT license.&lt;br /&gt;
&lt;br /&gt;
Asset deletion would be easier for a one simulator grid or a standalone.  However, even code to implement asset deletion on standalones has not yet been implemented and would certainly require significant simulator downtime.&lt;br /&gt;
&lt;br /&gt;
A promising area of research involves improving OpenSimulator's recording of asset access times (e.g. recording access periodically).  Then assets which aren't accessed for a long time (e.g. a year) could be deleted or moved to cold storage (e.g. DVD).  One is left with the problem of not deleting assets permanently cached by simulators but perhaps this could be solved by the simulators occasionally 'pinging' the asset service with notification of what assets they cache.&lt;br /&gt;
&lt;br /&gt;
Another step to reduce asset database size is to eliminate duplicate assets by hashing.  There is [[Deduplicating Asset Service|an experimental development asset service]] for this.  Third party services such as [[https://github.com/coyled/sras SRAS]] also do this.&lt;br /&gt;
&lt;br /&gt;
==== Possible solutions ====&lt;br /&gt;
&lt;br /&gt;
* If you run a grid for yourself or, if you run a grid where you do not give away your content, then the [http://was.fm/opensim:database:asset_cleaner asset cleaner] from [http://was.fm Wizardry and Steamworks] may be a good solution to track down stray assets and delete them from the database automatically. It is based on dumping OARs and IARs, as per the second option in this section, but after dumping them, it automatically performs the search for you and prompts you to delete several supported assets. Current development is going towards automatically exporting OARs and IARs from PHP so that the procedure is made seamless.&lt;br /&gt;
&lt;br /&gt;
* Save every region to an OAR and every user's inventory to an IAR.  We believe this is equivalent to finding all referenced assets and can be done manually.  However, it's very laborious for installations with a large number of users and requires grid downtime.  Tools could be written to improve this, particularly in systematically saving all user inventories to IARs.&lt;br /&gt;
&lt;br /&gt;
* Do nothing.  MySQL can store a very large amount of data before encountering issues - it's used for extremely large websites and other applications after all.  This assumes you have the disk space.&lt;br /&gt;
&lt;br /&gt;
* Use an external asset service such as [[https://github.com/coyled/sras SRAS]].  SRAS, in particular, is a third party asset service that does deduplication, asset compression, and stores assets on disk rather than in a database.  It also has some nice features like preventing assets being served without deleting them.  It's used by OSGrid, for instance.  However, it does work in a different way from the bundled OpenSimulator asset service (e.g. backup of on-disk assets involves some extra steps compared to just backing up a database).  It also requires a migration step that may take a considerable time if you have an existing asset collection.&lt;br /&gt;
&lt;br /&gt;
=== Other databases ===&lt;br /&gt;
&lt;br /&gt;
The space required by assets far outweighs other data storage requirements so only asset data is generally an issue.&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
&lt;br /&gt;
=== The problem ===&lt;br /&gt;
&lt;br /&gt;
The other problem is with handling the number of requests to services when the number of simulators and users grow.  The asset service isn't generally a problem since simulators cache all assets used, though it can form a bottleneck on OAR upload.  The biggest issue is generally caused by users, chiefly due to inventory access and perhaps update last user positions in the GridUser service (and database table).&lt;br /&gt;
&lt;br /&gt;
ROBUST uses an embedded [[http://webserver.codeplex.com/ C# HttpServer]].  Performance comparisons to other Webservers (e.g. Apache) have not been carried out (?) but responses appears to be much, much slower.  As it has been discontinued it's also rather unlikely to have it's performance improved.  In future, OpenSimulator may embed a different HTTP server but this is extremely unlikely in the short term.&lt;br /&gt;
&lt;br /&gt;
=== Possible solutions ===&lt;br /&gt;
&lt;br /&gt;
* Split up services.  By default, ROBUST runs every service in one process.  However, because services are separate from each other, you could run some services (e.g. inventory in one ROBUST instance and other services (e.g. asset) in a different instance, even if they both point to the same database.  Because the embedded C# webserver is slow and possibly not very concurrent, this can achieve significant performance improvements even if all ROBUST instances are running on the same machine.&lt;br /&gt;
&lt;br /&gt;
* Instantiate extra ROBUST copies of problem services (e.g. inventory).  Because services are stateless (akin to a webservice), you can load balance requests between multiple instances using a reverse proxy such as nginx.  Again, because the embedded webserver is probably inefficient, you can achieve performance improvements by running multiple copies of services on the same machine.&lt;br /&gt;
&lt;br /&gt;
* Use an external service based on a more efficient HTTP server, e.g. [https://github.com/coyled/sras SRAS] (asset service only) or [http://code.google.com/p/openmetaverse/ SimianGrid].  Please be aware that SimianGrid uses a different set of simulator &amp;lt;-&amp;gt; service protocols than used by ROBUST.  The necessary SimianGrid adaptors are part of the core OpenSimulator distribution.&lt;br /&gt;
&lt;br /&gt;
* Write your own services to run on an external webserver.  This wouldn't be too hard to do in something like PHP, though one would need to work out the currently undocumented wire formats.  If you do this, please do let us know :)&lt;br /&gt;
&lt;br /&gt;
= Performance studies and blog posts =&lt;br /&gt;
&lt;br /&gt;
These provide some interesting data on the performance limitations of OpenSimulator at various points in time.&lt;br /&gt;
&lt;br /&gt;
* [https://lists.berlios.de/pipermail/opensim-users/2010-August/005189.html https://lists.berlios.de/pipermail/opensim-users/2010-August/005189.html] - Some interesting information from Mr Blue.  Physical objects and max avatars are limited by single thread performance in OpenSimulator.&lt;br /&gt;
* [http://www.sciencesim.com/wiki/doku.php/vwperf/start http://www.sciencesim.com/wiki/doku.php/vwperf/start] - Links to ScienceSim performance studies, including some very recent ones.&lt;br /&gt;
* [[Improving Performance]] - An old page from July 2009 detailing some performance issues on OpenSimulator.  Some of these issues are still valid (e.g. ODE issues).&lt;br /&gt;
* [[NHibernate Performance Testing]] — SQLite and MySQL performance tests with NHibernate.&lt;br /&gt;
* [[LibSecondLife performance problems]] - Another old page from November 2007 detailing issues with libsecondlife (now called libopenmetaverse).&lt;br /&gt;
* [http://opensim.cybertechnews.org/?p=71 Experiences from Operating a 3D Region Server in OSGrid - Part 1]&lt;br /&gt;
* [http://opensim.cybertechnews.org/?p=104 Experiences from Operating a 3D Region Server in OSGrid - Part 2]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
==Performance hints==&lt;br /&gt;
&lt;br /&gt;
Here are some specific things you might be able to do to improve performance&lt;br /&gt;
&lt;br /&gt;
===Home Based systems===&lt;br /&gt;
&lt;br /&gt;
The most obvious performance difference between a home based cable/dsl system and a &amp;quot;commercial&amp;quot; server is the upload bandwidth. A typical home system allows 100Kb/s upload with 12Mb/s download, a &amp;quot;commercial&amp;quot; system typically has a &amp;quot;symmetrical&amp;quot; bandwidth of say 12Mb/s UP AND DOWN! &amp;quot;Commercial&amp;quot; systems can essentially buy unlimited bandwidth as needed, but it does get expensive to buy bandwidth that you don't need!&lt;br /&gt;
&lt;br /&gt;
In practice this limits the number of &amp;quot;external&amp;quot; users on a &amp;quot;home system&amp;quot; to 4 or 5, but LAN users (NPCs/bots etc.) are essentially unlimited.&lt;br /&gt;
&lt;br /&gt;
A reasonable strategy (i.e. MY strategy) is to use the home system for experimentation and then move the entire sim to a &amp;quot;commercial&amp;quot; VPS service if the sim gets popular (and produces enough $$$ to pay the freight!) &lt;br /&gt;
&lt;br /&gt;
===Running Squid on your region server as a reverse proxy to the asset server===&lt;br /&gt;
1. Download and install the Squid Proxy from: http://www.squid-cache.org/Download/&amp;lt;br&amp;gt;&lt;br /&gt;
2. Create your [[squid.conf]] configuration file.&amp;lt;br&amp;gt;&lt;br /&gt;
3. Change your asset_server configuration in your OpenSim.ini to point to http://localhost:3128/&amp;lt;br&amp;gt;&lt;br /&gt;
4. Start everything up!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now assets will be cached in the squid cache on the region server, and will be served up much faster, especially on region restart.&lt;br /&gt;
&lt;br /&gt;
=== GC_NO_EXPLICIT ===&lt;br /&gt;
&lt;br /&gt;
Sometimes this patch applied to mono-svn has helped my sim run a lot faster and not slowly get bogged down.&lt;br /&gt;
&lt;br /&gt;
$mono-svn-root$/mono&lt;br /&gt;
  mono/metadata/boehm-gc.c&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Index: boehm-gc.c&lt;br /&gt;
===================================================================&lt;br /&gt;
--- boehm-gc.c	(revision 105684)&lt;br /&gt;
+++ boehm-gc.c	(working copy)&lt;br /&gt;
@@ -107,6 +107,10 @@&lt;br /&gt;
 void&lt;br /&gt;
 mono_gc_collect (int generation)&lt;br /&gt;
 {&lt;br /&gt;
+	static int no_explicite_gc = 0; if (no_explicite_gc==0) {if (getenv(&amp;quot;GC_NO_EXPLICIT&amp;quot;)) {no_explicite_gc = 1;return;} else {no_explicite_gc = 2;}} else if (no_explicite_gc==1) {&lt;br /&gt;
+		g_print(&amp;quot;\n --------GC_NO_EXPLICIT \n&amp;quot;);&lt;br /&gt;
+		return;&lt;br /&gt;
+		}&lt;br /&gt;
 	MONO_PROBE_GC_BEGIN (generation);&lt;br /&gt;
 	&lt;br /&gt;
 	GC_gcollect ();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not only this, but I recompile the mono runtime:&lt;br /&gt;
&amp;lt;pre&amp;gt;--with-large-heap=yes&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
 export GC_NO_EXPLICIT=1&lt;br /&gt;
and&lt;br /&gt;
 unset GC_NO_EXPLICIT&lt;br /&gt;
&lt;br /&gt;
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 (&amp;gt;3GB), it is possible might keep mono less apt to do stop world complete collections as often.&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joe Radik</name></author>	</entry>

	</feed>