diff options
author | Diva Canto | 2013-08-05 14:21:39 -0700 |
---|---|---|
committer | Diva Canto | 2013-08-05 14:21:39 -0700 |
commit | 2d3ac2b1ec321d7d6418d548872dcecdbc3cb14c (patch) | |
tree | ca9a354c5a10d40679101e20ffce27afe6d257ea /OpenSim/Region | |
parent | Child agent updates: remove the dependency on the root agent's camera positio... (diff) | |
parent | Comment out debug log lines about script modules comms for now. (diff) | |
download | opensim-SC_OLD-2d3ac2b1ec321d7d6418d548872dcecdbc3cb14c.zip opensim-SC_OLD-2d3ac2b1ec321d7d6418d548872dcecdbc3cb14c.tar.gz opensim-SC_OLD-2d3ac2b1ec321d7d6418d548872dcecdbc3cb14c.tar.bz2 opensim-SC_OLD-2d3ac2b1ec321d7d6418d548872dcecdbc3cb14c.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 41 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | 4 |
2 files changed, 29 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index e451aa8..2e155ec 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -103,26 +103,38 @@ namespace OpenSim | |||
103 | "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); | 103 | "[OPENSIM MAIN]: Environment variable MONO_THREADS_PER_CPU is {0}", monoThreadsPerCpu ?? "unset"); |
104 | 104 | ||
105 | // Verify the Threadpool allocates or uses enough worker and IO completion threads | 105 | // Verify the Threadpool allocates or uses enough worker and IO completion threads |
106 | // .NET 2.0 workerthreads default to 50 * numcores | 106 | // .NET 2.0, workerthreads default to 50 * numcores |
107 | // .NET 3.0 workerthreads defaults to 250 * numcores | 107 | // .NET 3.0, workerthreads defaults to 250 * numcores |
108 | // .NET 4.0 workerthreads are dynamic based on bitness and OS resources | 108 | // .NET 4.0, workerthreads are dynamic based on bitness and OS resources |
109 | // Max IO Completion threads are 1000 on all 3 CLRs. | 109 | // Max IO Completion threads are 1000 on all 3 CLRs |
110 | // | ||
111 | // Mono 2.10.9 to at least Mono 3.1, workerthreads default to 100 * numcores, iocp threads to 4 * numcores | ||
110 | int workerThreadsMin = 500; | 112 | int workerThreadsMin = 500; |
111 | int workerThreadsMax = 1000; // may need further adjustment to match other CLR | 113 | int workerThreadsMax = 1000; // may need further adjustment to match other CLR |
112 | int iocpThreadsMin = 1000; | 114 | int iocpThreadsMin = 1000; |
113 | int iocpThreadsMax = 2000; // may need further adjustment to match other CLR | 115 | int iocpThreadsMax = 2000; // may need further adjustment to match other CLR |
116 | |||
117 | { | ||
118 | int currentMinWorkerThreads, currentMinIocpThreads; | ||
119 | System.Threading.ThreadPool.GetMinThreads(out currentMinWorkerThreads, out currentMinIocpThreads); | ||
120 | m_log.InfoFormat( | ||
121 | "[OPENSIM MAIN]: Runtime gave us {0} min worker threads and {1} min IOCP threads", | ||
122 | currentMinWorkerThreads, currentMinIocpThreads); | ||
123 | } | ||
124 | |||
114 | int workerThreads, iocpThreads; | 125 | int workerThreads, iocpThreads; |
115 | System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); | 126 | System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads); |
116 | m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads); | 127 | m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} max worker threads and {1} max IOCP threads", workerThreads, iocpThreads); |
128 | |||
117 | if (workerThreads < workerThreadsMin) | 129 | if (workerThreads < workerThreadsMin) |
118 | { | 130 | { |
119 | workerThreads = workerThreadsMin; | 131 | workerThreads = workerThreadsMin; |
120 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up to worker threads to {0}",workerThreads); | 132 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up to max worker threads to {0}",workerThreads); |
121 | } | 133 | } |
122 | if (workerThreads > workerThreadsMax) | 134 | if (workerThreads > workerThreadsMax) |
123 | { | 135 | { |
124 | workerThreads = workerThreadsMax; | 136 | workerThreads = workerThreadsMax; |
125 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting worker threads to {0}",workerThreads); | 137 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting max worker threads to {0}",workerThreads); |
126 | } | 138 | } |
127 | 139 | ||
128 | // Increase the number of IOCP threads available. | 140 | // Increase the number of IOCP threads available. |
@@ -130,22 +142,24 @@ namespace OpenSim | |||
130 | if (iocpThreads < iocpThreadsMin) | 142 | if (iocpThreads < iocpThreadsMin) |
131 | { | 143 | { |
132 | iocpThreads = iocpThreadsMin; | 144 | iocpThreads = iocpThreadsMin; |
133 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up IO completion threads to {0}",iocpThreads); | 145 | m_log.InfoFormat("[OPENSIM MAIN]: Bumping up max IO completion threads to {0}",iocpThreads); |
134 | } | 146 | } |
135 | // Make sure we don't overallocate IOCP threads and thrash system resources | 147 | // Make sure we don't overallocate IOCP threads and thrash system resources |
136 | if ( iocpThreads > iocpThreadsMax ) | 148 | if ( iocpThreads > iocpThreadsMax ) |
137 | { | 149 | { |
138 | iocpThreads = iocpThreadsMax; | 150 | iocpThreads = iocpThreadsMax; |
139 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting IO completion threads to {0}",iocpThreads); | 151 | m_log.InfoFormat("[OPENSIM MAIN]: Limiting max IO completion threads to {0}",iocpThreads); |
140 | } | 152 | } |
141 | // set the resulting worker and IO completion thread counts back to ThreadPool | 153 | // set the resulting worker and IO completion thread counts back to ThreadPool |
142 | if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) ) | 154 | if ( System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads) ) |
143 | { | 155 | { |
144 | m_log.InfoFormat("[OPENSIM MAIN]: Threadpool set to {0} worker threads and {1} IO completion threads", workerThreads, iocpThreads); | 156 | m_log.InfoFormat( |
157 | "[OPENSIM MAIN]: Threadpool set to {0} max worker threads and {1} max IO completion threads", | ||
158 | workerThreads, iocpThreads); | ||
145 | } | 159 | } |
146 | else | 160 | else |
147 | { | 161 | { |
148 | m_log.Info("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect."); | 162 | m_log.Warn("[OPENSIM MAIN]: Threadpool reconfiguration failed, runtime defaults still in effect."); |
149 | } | 163 | } |
150 | 164 | ||
151 | // Check if the system is compatible with OpenSimulator. | 165 | // Check if the system is compatible with OpenSimulator. |
@@ -153,17 +167,16 @@ namespace OpenSim | |||
153 | string supported = String.Empty; | 167 | string supported = String.Empty; |
154 | if (Util.IsEnvironmentSupported(ref supported)) | 168 | if (Util.IsEnvironmentSupported(ref supported)) |
155 | { | 169 | { |
156 | m_log.Info("Environment is compatible.\n"); | 170 | m_log.Info("[OPENSIM MAIN]: Environment is supported by OpenSimulator."); |
157 | } | 171 | } |
158 | else | 172 | else |
159 | { | 173 | { |
160 | m_log.Warn("Environment is unsupported (" + supported + ")\n"); | 174 | m_log.Warn("[OPENSIM MAIN]: Environment is not supported by OpenSimulator (" + supported + ")\n"); |
161 | } | 175 | } |
162 | 176 | ||
163 | // Configure nIni aliases and localles | 177 | // Configure nIni aliases and localles |
164 | Culture.SetCurrentCulture(); | 178 | Culture.SetCurrentCulture(); |
165 | 179 | ||
166 | |||
167 | // Validate that the user has the most basic configuration done | 180 | // Validate that the user has the most basic configuration done |
168 | // If not, offer to do the most basic configuration for them warning them along the way of the importance of | 181 | // If not, offer to do the most basic configuration for them warning them along the way of the importance of |
169 | // reading these files. | 182 | // reading these files. |
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs index 6bf50d2..a515346 100644 --- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs | |||
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
163 | 163 | ||
164 | public void RegisterScriptInvocation(object target, MethodInfo mi) | 164 | public void RegisterScriptInvocation(object target, MethodInfo mi) |
165 | { | 165 | { |
166 | m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, (target is Type) ? ((Type)target).Name : target.GetType().Name); | 166 | // m_log.DebugFormat("[MODULE COMMANDS] Register method {0} from type {1}", mi.Name, (target is Type) ? ((Type)target).Name : target.GetType().Name); |
167 | 167 | ||
168 | Type delegateType; | 168 | Type delegateType; |
169 | List<Type> typeArgs = mi.GetParameters() | 169 | List<Type> typeArgs = mi.GetParameters() |
@@ -323,7 +323,7 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms | |||
323 | /// </summary> | 323 | /// </summary> |
324 | public void RegisterConstant(string cname, object value) | 324 | public void RegisterConstant(string cname, object value) |
325 | { | 325 | { |
326 | m_log.DebugFormat("[MODULE COMMANDS] register constant <{0}> with value {1}",cname,value.ToString()); | 326 | // m_log.DebugFormat("[MODULE COMMANDS] register constant <{0}> with value {1}",cname,value.ToString()); |
327 | lock (m_constants) | 327 | lock (m_constants) |
328 | { | 328 | { |
329 | m_constants.Add(cname,value); | 329 | m_constants.Add(cname,value); |