From 2f394b7e7ebf991c7a70f93bf251d26d8043aaa2 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Oct 2009 01:30:12 -0700 Subject: * Allow SmartThreadPool to be initialized without setting max stack size (like the original implementation) * Only initialize Util's SmartThreadPool if it is actually being used * No longer initializing Util's SmartThreadPool with a custom max stack size. From MSDN: "Avoid using this constructor overload. The default stack size used by the Thread(ThreadStart) constructor overload is the recommended stack size for threads." --- bin/OpenSim.ini.example | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 79d57d2..08f87d6 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -38,8 +38,15 @@ ; Sets the method that OpenSim will use to fire asynchronous ; events. Valid values are UnsafeQueueUserWorkItem, - ; QueueUserWorkItem, BeginInvoke, SmartThreadPool, and Thread - ; async_call_method = SmartThreadPool + ; QueueUserWorkItem, BeginInvoke, SmartThreadPool, and Thread. + ; SmartThreadPool is reported to work well on Mono/Linux, but + ; UnsafeQueueUserWorkItem has been benchmarked with better + ; performance on .NET/Windows + ;async_call_method = SmartThreadPool + + ; Max threads to allocate on the FireAndForget thread pool + ; when running with the SmartThreadPool option above + MaxPoolThreads = 15 ; ## ; ## CLIENTS @@ -51,9 +58,6 @@ ; Set this to the DLL containing the client stack to use. clientstack_plugin="OpenSim.Region.ClientStack.LindenUDP.dll" - ; Max threads to allocate on the FireAndForget pool - MaxPoolThreads = 15 - ; ## ; ## REGIONS ; ## -- cgit v1.1 From 4121a02936b306895840cf1574197b0f6621c19e Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Oct 2009 10:15:28 -0700 Subject: OpenSim.ini.example had the wrong names for default values in the [InterestManagement] section. Fixed --- bin/OpenSim.ini.example | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 08f87d6..6ff70fc 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1396,12 +1396,13 @@ ;TextureDataLimit = 5 [InterestManagement] - ; This section controls how state updates are prioritized for each client - UpdatePrioritizationScheme = Distance - ReprioritizeUpdate = true - RootUpdateReprioritizationDistance = 10.0 - ChildUpdateReprioritizationDistance = 20.0 - ReprioritizeUpdatesInterval = 5000.0 + ; This section controls how state updates are prioritized for each client + ; Valid values are Time, Distance, and SimpleAngularDistance + UpdatePrioritizationScheme = Distance; + ReprioritizationEnabled = true; + ReprioritizationInterval = 2000.0; + RootReprioritizationDistance = 10.0; + ChildReprioritizationDistance = 20.0; ;; ;; These are defaults that are overwritten below in [Architecture]. -- cgit v1.1 From 96d53f11e554f37c135fa2d009f9ffed1a5ec724 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Oct 2009 17:03:13 -0700 Subject: Added VS2010 support to Prebuild and created runprebuild2010.bat --- bin/Prebuild.exe | Bin 246272 -> 237568 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'bin') diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index e58657c..eb4c224 100755 Binary files a/bin/Prebuild.exe and b/bin/Prebuild.exe differ -- cgit v1.1 From 62f1a5e36d85b95e8f80bc073ba876873494963a Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 02:38:59 -0700 Subject: Implemented a "FrontBack" prioritizer, using distance plus the plane equation to give double weight to prims/avatars in front of you --- bin/OpenSim.ini.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 6ff70fc..3dc746e 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1397,8 +1397,8 @@ [InterestManagement] ; This section controls how state updates are prioritized for each client - ; Valid values are Time, Distance, and SimpleAngularDistance - UpdatePrioritizationScheme = Distance; + ; Valid values are Time, Distance, SimpleAngularDistance, and FrontBack + UpdatePrioritizationScheme = FrontBack; ReprioritizationEnabled = true; ReprioritizationInterval = 2000.0; RootReprioritizationDistance = 10.0; -- cgit v1.1 From 4c45b5fd3c6b636552b819c6a56c1a3c23683bfb Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 10:35:47 -0700 Subject: Cleaning up OpenSim.ini.example for LLUDP. The [LLClient] section has been removed and several new parameters have been added to [ClientStack.LindenUDP] --- bin/OpenSim.ini.example | 62 ++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 3dc746e..f426556 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -355,8 +355,9 @@ ; already separated from packet handling with a queue, so this will only ; affect whether networking internals such as packet decoding and ; acknowledgement accounting are done synchronously or asynchronously - async_packet_handling = false - + ; + ;async_packet_handling = false + ; The client socket receive buffer size determines how many ; incoming requests we can process; the default on .NET is 8192 ; which is about 2 4k-sized UDP datagrams. On mono this is @@ -371,22 +372,26 @@ ; by the system's settings for the maximum client receive buffer ; size (on linux systems you can set that with "sysctl -w ; net.core.rmem_max=X") + ; ;client_socket_rcvbuf_size = 8388608 ; Maximum outbound bytes per second for a single scene. This can be used to ; throttle total outbound UDP traffic for a simulator. The default value is ; 0, meaning no throttling at the scene level. The example given here is ; 20 megabits + ; ;scene_throttle_max_bps = 2621440 ; Maximum bits per second to send to any single client. This will override ; the user's viewer preference settings. The default value is 0, meaning no ; aggregate throttling on clients (only per-category throttling). The ; example given here is 1.5 megabits + ; ;client_throttle_max_bps = 196608 ; Per-client bytes per second rates for the various throttle categories. ; These are default values that will be overriden by clients + ; ;resend_default = 12500 ;land_default = 500 ;wind_default = 500 @@ -399,6 +404,7 @@ ; Per-client maximum burst rates in bytes per second for the various ; throttle categories. These are default values that will be overriden by ; clients + ; ;resend_limit = 18750 ;land_limit = 29750 ;wind_limit = 18750 @@ -407,6 +413,28 @@ ;texture_limit = 55750 ;asset_limit = 27500 ;state_limit = 37000 + + ; Configures how ObjectUpdates are aggregated. These numbers + ; do not literally mean how many updates will be put in each + ; packet that goes over the wire, as packets are + ; automatically split on a 1400 byte boundary. These control + ; the balance between responsiveness of interest list updates + ; and total throughput. Higher numbers will ensure more full- + ; sized packets and faster sending of data, but more delay in + ; updating interest lists + ; + ;PrimTerseUpdatesPerPacket = 25 + ;AvatarTerseUpdatesPerPacket = 10 + ;PrimFullUpdatesPerPacket = 100 + + ; TextureSendLimit determines how many packets will be put on + ; the outgoing queue each cycle. Like the settings above, this + ; is a balance between responsiveness to priority updates and + ; total throughput. Higher numbers will give a better + ; throughput at the cost of reduced responsiveness to client + ; priority changes or transfer aborts + ; + ;TextureSendLimit = 20 [Chat] ; Controls whether the chat module is enabled. Default is true. @@ -1365,36 +1393,6 @@ ;RecycleDataBlocks = true; -[LLClient] - ; Resend packets markes as reliable until they are received - ; - ;ReliableIsImportant = false - - ; Maximum number of times to resend packets marked reliable - ; - ;MaxReliableResends = 3 - - ; Configures how ObjectUpdates are compressed. - ; - ;TerseUpdatesPerPacket=10 - ;FullUpdatesPerPacket=14 - ;TerseUpdateRate=10 - ;FullUpdateRate=14 - - ;PacketMTU = 1400 - - ; TextureSendLimit determines how many different textures - ; will be considered on each cycle. Textures are selected - ; by priority. The old mechanism specified a value of 10 for - ; this parameter. - ; - ;TextureSendLimit = 10 - - ; TextureDataLimit determines how many packets will be sent for - ; each of the selected textures. Default is 5. - ; - ;TextureDataLimit = 5 - [InterestManagement] ; This section controls how state updates are prioritized for each client ; Valid values are Time, Distance, SimpleAngularDistance, and FrontBack -- cgit v1.1 From a41cd1d0695c01e4096fa0b7696b415a4c7455fc Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 13:14:29 -0700 Subject: * Unregister Mono.Addins event handlers in PluginLoader.Dispose() and always handle PluginLoader with the using pattern. This freed up 121,634,796 bytes on my system * Avoid allocating an Action object every round of the OutgoingPacketHandler * Removed unnecessary semi-colon endings from OpenSim.ini.example [InterestManagement] section --- bin/OpenSim.ini.example | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index f426556..9ee9829 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1396,11 +1396,11 @@ [InterestManagement] ; This section controls how state updates are prioritized for each client ; Valid values are Time, Distance, SimpleAngularDistance, and FrontBack - UpdatePrioritizationScheme = FrontBack; - ReprioritizationEnabled = true; - ReprioritizationInterval = 2000.0; - RootReprioritizationDistance = 10.0; - ChildReprioritizationDistance = 20.0; + UpdatePrioritizationScheme = FrontBack + ReprioritizationEnabled = true + ReprioritizationInterval = 2000.0 + RootReprioritizationDistance = 10.0 + ChildReprioritizationDistance = 20.0 ;; ;; These are defaults that are overwritten below in [Architecture]. -- cgit v1.1 From 3639f684116e0fd248182b9d8efc0c27d4736ab7 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 25 Oct 2009 01:20:54 -0700 Subject: Added a missing reference to System.Core for OpenSim.Region.Framework --- bin/OpenMetaverse.dll | Bin 1630208 -> 1638400 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'bin') diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 6ec1b1c..3f9255e 100644 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ -- cgit v1.1 From 4847e62e9fd1cd473cc180220a379efba93f94a6 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 26 Oct 2009 16:33:04 -0700 Subject: * Switched all operations on the list of clients that could be either sync or async to use Scene.ForEachClient() instead of referencing ClientManager directly * Added a new [Startup] config option called use_async_when_possible to signal how to run operations that could be either sync or async * Changed Scene.ForEachClient to respect use_async_when_possible * Fixing a potential deadlock in Parallel.ForEach by locking on a temporary object instead of the enumerator (which may be shared across multiple invocations on ForEach). Thank you diva --- bin/OpenSim.ini.example | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 9ee9829..2adc87f 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -44,6 +44,13 @@ ; performance on .NET/Windows ;async_call_method = SmartThreadPool + ; There are several operations on large collections (such as + ; the current avatar list) that can be run synchronously or + ; in parallel. Running in parallel should increase performance + ; on a multi-core system, but will make debugging more + ; difficult if something deadlocks or times out + use_async_when_possible = true + ; Max threads to allocate on the FireAndForget thread pool ; when running with the SmartThreadPool option above MaxPoolThreads = 15 -- cgit v1.1 From b498693cff9b044e8ab3c7a88a18e9d67f16461b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 27 Oct 2009 01:46:14 -0700 Subject: * Tweak to region module loading to check for a matching constructor first instead of throwing and catching exceptions * Commenting out the MySQL startup sequence that cleans out dropped attachments under the advice that it is no longer relevant. If anything, it could be brought back as a database cleanup console command * Updated to the latest libomv 0.8.0-pre. UUID.TryParse() will no longer throw and catch exceptions for most failed UUID parses --- bin/OpenMetaverse.dll | Bin 1638400 -> 1642496 bytes bin/OpenMetaverseTypes.dll | Bin 102400 -> 102400 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'bin') diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 3f9255e..8b07942 100644 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index 6cea131..331d58b 100644 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ -- cgit v1.1 From 3a1ee79ee4239213b35f6b73a65c127c2af977fb Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 27 Oct 2009 02:36:57 -0700 Subject: Finally hunted down the Parallel deadlock. Packets were being handled asynchronously (filling up the threadpool with handlers), which would turn around and try to do parallel operations on the starved threadpool. The solution for now is to disable Parallel.cs operations until we can gracefully handle parallel operations with a potentially starved threadpool --- bin/OpenSim.ini.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 2adc87f..4f1799e 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -49,7 +49,7 @@ ; in parallel. Running in parallel should increase performance ; on a multi-core system, but will make debugging more ; difficult if something deadlocks or times out - use_async_when_possible = true + use_async_when_possible = false ; Max threads to allocate on the FireAndForget thread pool ; when running with the SmartThreadPool option above -- cgit v1.1 From 2525810e2a1b23f9c5b17b3d075e02c0c6255e2c Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 27 Oct 2009 13:31:04 -0700 Subject: Removed the DotNetEngine scripting engine. You will need to create a fresh checkout or clean out all *DotNet*.dll assemblies from the bin/ directory to run OpenSim moving forward --- bin/OpenSim.ini.example | 128 +----------------------------------------------- 1 file changed, 1 insertion(+), 127 deletions(-) (limited to 'bin') diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 4f1799e..927eb7a 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -218,7 +218,6 @@ ; ## SCRIPT ENGINE ; ## - ;DefaultScriptEngine = "ScriptEngine.DotNetEngine" DefaultScriptEngine = "XEngine" ; ## @@ -826,137 +825,12 @@ ; Density of tree population tree_density = 1000.0 + [VectorRender] ; the font to use for rendering text (default: Arial) ; font_name = "Arial" -[ScriptEngine.DotNetEngine] - Enabled = true - - ScriptDelayFactor = 1.0 - ScriptDistanceLimitFactor = 1.0 - - ; Maximum length of notecard line read - ; Increasing this to large values potentially opens - ; up the system to malicious scripters - ; NotecardLineReadCharsMax = 255 - - ; - ; 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 using "CONFIG SET" on console - ; For example to increase or decrease number of threads: CONFIG SET NumberOfScriptThreads 10 - ; NOTE! Disabled for now. Feature does not work. - 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 - - ; 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 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 - - ; MaintenanceLoop - ; How often to run maintenance loop - ; Maintenance loop is doing: script compile/load, script unload, reload config, adjust running config and enforce max execution time - MaintenanceLoopms=50 - - ; How many maintenanceloops between each of these. - ; (if 2 then function will be executed every MaintenanceLoopms*2 ms) - ; Script loading/unloading - - ; 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 - MaintenanceLoopTicks_ScriptLoadUnload=1 - - ; Other tasks - ; check if we need to reload config, adjust running config and enforce max execution time - MaintenanceLoopTicks_Other=10 - - ; Allow the use of os* functions (some are dangerous) - ; Default is false - AllowOSFunctions = false - - ; Threat level to allow if os functions are enabled - ; One of None, VeryLow, Low, Moderate, High, VeryHigh, Severe - ; Default is VeryLow - OSFunctionThreatLevel = VeryLow - - ; 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 - ; currently unused - ; 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=false - - ; Specify default script compiler - ; If you do not specify //cs, //vb, //js or //lsl tag as the first characters of your script then the default compiler will be chosen - ; Valid languages are: lsl, cs, js and vb - DefaultCompileLanguage=lsl - - ; Specify what compilers are allowed to be used - ; Note vb only works on Windows for now (Mono lacks VB compile support) - ; Valid languages are: lsl, cs, js and vb - ; AllowedCompilers=lsl,cs,js,vb. *warning*, non lsl languages have access to static methods such as System.IO.File. Enable at your own risk. - AllowedCompilers=lsl - - ; 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 - ; currently unused - ;CleanUpOldScriptsOnStartup=true - [LL-Functions] ; Set the following to true to allow administrator owned scripts to execute console commands -- cgit v1.1