[Opensim-dev] Grid owners -> new script engine options

Tedd Hansen tedd at konge.net
Sat Feb 2 04:52:41 UTC 2008


A few more options:

 

; ##

; ## ScriptEngine

; ##

; These are region modules loaded into each region to provide script
support

; Scripts may be everything from LSL or C# scripts put in prims to whole
game systems that controls the whole grid.

; You can load multiple modules by separating them with a coma.

;

; Example:

;script_engine =
OpenSim.Region.ScriptEngine.DotNetEngine.dll,OpenSim.Region.ScriptEngine
.RemoteServer.dll

;

; This is the current and most stable ScriptEngine:

script_engine = OpenSim.Region.ScriptEngine.DotNetEngine.dll

 

;Experimental remote ScriptServer plugin (does not currently work):

;script_engine = OpenSim.Region.ScriptEngine.RemoteServer.dll

 

 

[ScriptEngine.DotNetEngine]

;

; These settings are specific to DotNetEngine script engine

; Other script engines based on OpenSim.Region.ScriptEngine.Common.dll
will have almost identical settings, but in another section of this
config file.

;

 

; When a script receives an event the event is queued.

; Any free thread will start executing this event. One script can only
have one event executed simultaneously.

; If you have only one thread, and one script has a loop or does a lot
of work, then no other scripts can run at the same time.

; Same if you have 10 threads, then only 10 scripts can be run
simultaneously. 

; But because most scripts exit after their task, the threads are free
to go on to the next script.

 

; Refresh ScriptEngine config options (these settings) every xx seconds

; 0 = Do not refresh

; Set it to number of seconds between refresh, for example 30.

; Will allow you to change ScriptEngine settings while server is running
just by editing this file.

; For example to increase or decrease number of threads.

RefreshConfig=0

 

; Number of threads to use for script event execution

; Threads are shared across all regions

NumberOfScriptThreads=2

 

; Script event execution thread priority inside application.

; Valid values: Lowest, BelowNormal, Normal, AboveNormal, Highest

ScriptThreadPriority=BelowNormal

 

; Should the script threads be private for each region?

; true: Each region will get <NumberOfScriptThreads> dedicated to
scripts within that region

;       Number of threads will be
<NumberOfScriptThreads>*<NumberOfRegions>

; false: All regions share <NumberOfScriptThreads> for all their scripts

;        Note! If you run multiple script engines based on
"OpenSim.Region.ScriptEngine.Common" then all of them will share the
same threads.

; *** This setting will not work until you restart OpenSim

PrivateRegionThreads=false

 

; How long MAX should a script event be allowed to run (per event
execution)?

; Do not set this too low (like 50ms) as there are some time wasted in
simply executing a function

; There is also a small speed penalty for every kill that is made

MaxEventExecutionTimeMs=5000

 

; Should we enable the max script event execution thread to look for
scripts that exceed their timeslice?

EnforceMaxEventExecutionTime=true

 

; Should we stop the script completely when time exceeds?

; This is useful if you have a high <MaxEventExecutionTimeMs> and want
to deactivate scripts that go wrong

; Note that for example physics engine can slow down the system and make
scripts spend more time

DeactivateScriptOnTimeout=false

 

; If no scripts have executed in this pass how long should we sleep
before checking again

; Impact:

; Too low and you will waste lots of CPU

; Too high and people touching object or similar will have to wait up to
this amount of time before script responding

SleepTimeIfNoScriptExecutionMs=50

 

; AppDomains are used for two things:

; * Security: Scripts inside AppDomains are limited in permissions. 

; * Script unloading: When a script is deactivated it can not be
unloaded. Only whole AppDomains can be unloaded.

;                     AppDomains are therefore only unloaded once ALL
active scripts inside it has been deactivated (removed from prims).

; Each AppDomain has some memory overhead. But leaving dead scripts in
memory also has memory overhead.

ScriptsPerAppDomain=1

 

; Script loading / unloading sleep

; How long load/unload thread should sleep if there is nothing to do

; Higher value makes it respond slower when scripts are added/removed
from prims

; But once active it will process all in queue before sleeping again

ScriptLoadUnloadLoopms=30

 

; Loading and unloading of scripts is queued and processed by a separate
thread.

; This thread can either be shared among all regions, or private (one
thread per region)

PrivateScriptLoadUnloadThread=false

 

; Maximum number of items in load/unload queue before we start rejecting
loads

; Note that we will only be rejecting load. Unloads will still be able
to queue.

LoadUnloadMaxQueueSize=100

 

; Maximum number of (LSL) events that can be queued before new events
are ignored.

EventExecutionMaxQueueSize=300

 

 

; Async LL command sleep

; If no async LL commands are waiting, how long should thread sleep
before checking again

; Async LL commands are LSL-commands that causes an event to be fired
back with result

AsyncLLCommandLoopms=50

 

; When script is converted from LSL to C#, or just plain compiled, a
copy of the script source will be put in the ScriptEngine folder

WriteScriptSourceToDebugFile=true

 

; Specify default script compiler

; If you do not specify //cs, //vb or //lsl tag as the first characters
of your script then the default compiler will be chosen

; Valid languages are: lsl, cs and vb

DefaultCompileLanguage=lsl

 

; Specify what compilers are allowed to be used

; Valid languages are: lsl, cs and vb

AllowedCompilers=lsl,cs,vb

 

; Compile scripts with debugging

; Probably a thousand times slower, but gives you a line number when
something goes wrong.

CompileWithDebugInformation=true

 

; Remove old scripts on next startup

CleanUpOldScriptsOnStartup=true

 

From: opensim-dev-bounces at lists.berlios.de
[mailto:opensim-dev-bounces at lists.berlios.de] On Behalf Of Tedd Hansen
Sent: 1. februar 2008 21:20
To: opensim-dev at lists.berlios.de
Subject: [Opensim-dev] Grid owners -> new script engine options

 

There are some new config options you might be handy.

Especially the option to share script execution threads between regions.

 

 

OpenSim.INI:

 

[ScriptEngine.DotNetEngine]

 

; When a script receives an event the event is queued.

; Any free thread will start executing this event. One script can only
have one event executed simultaneously.

; If you have only one thread, and one script has a loop or does a lot
of work, then no other scripts can run at the same time.

; Same if you have 10 threads, then only 10 scripts can be run
simultaneously. 

; But because most scripts exit after their task, the threads are free
to go on to the next script.

 

; Number of threads to use for script event execution

; Threads are shared across all regions

NumberOfScriptThreads=2

 

; Should the script threads be private for each region?

; true: Each region will get <NumberOfScriptThreads> dedicated to
scripts within that region

;       Number of threads will be
<NumberOfScriptThreads>*<NumberOfRegions>

; false: All regions share <NumberOfScriptThreads> for all their scripts

PrivateRegionThreads=false

 

; How long MAX should a script event be allowed to run (per event
execution)?

; Do not set this too low (like 50ms) as there are some time wasted in
simply executing a function

; There is also a small speed penalty for every kill that is made

MaxEventExecutionTimeMs=5000

 

; Should we enable the max script event execution thread to look for
scripts that exceed their timeslice?

EnforceMaxEventExecutionTime=true

 

; If no scripts have executed in this pass how long should we sleep
before checking again

; Impact:

; Too low and you will waste lots of CPU

; Too high and people touching object or similar will have to wait up to
this amount of time before script responding

SleepTimeIfNoScriptExecutionMs=50

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080202/1429bc92/attachment-0001.html>


More information about the Opensim-dev mailing list