diff options
author | Melanie | 2013-08-07 23:29:42 +0100 |
---|---|---|
committer | Melanie | 2013-08-07 23:29:42 +0100 |
commit | 005c69511dac490a8353233423a3152abf5580dd (patch) | |
tree | abae7717af4af3ed7844f3747ab28398fdad9cdf /OpenSim/Region/Application | |
parent | Merge branch 'avination-current' into careminster (diff) | |
parent | minor: add some method doc to ScenePresence fields used for entity transfer, ... (diff) | |
download | opensim-SC_OLD-005c69511dac490a8353233423a3152abf5580dd.zip opensim-SC_OLD-005c69511dac490a8353233423a3152abf5580dd.tar.gz opensim-SC_OLD-005c69511dac490a8353233423a3152abf5580dd.tar.bz2 opensim-SC_OLD-005c69511dac490a8353233423a3152abf5580dd.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 41 | ||||
-rw-r--r-- | OpenSim/Region/Application/ConfigurationLoader.cs | 1 |
2 files changed, 27 insertions, 15 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/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index fc3999f..3e93638 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -337,7 +337,6 @@ namespace OpenSim | |||
337 | config.Set("physics", "OpenDynamicsEngine"); | 337 | config.Set("physics", "OpenDynamicsEngine"); |
338 | config.Set("meshing", "Meshmerizer"); | 338 | config.Set("meshing", "Meshmerizer"); |
339 | config.Set("physical_prim", true); | 339 | config.Set("physical_prim", true); |
340 | config.Set("see_into_this_sim_from_neighbor", true); | ||
341 | config.Set("serverside_object_permissions", true); | 340 | config.Set("serverside_object_permissions", true); |
342 | config.Set("storage_plugin", "OpenSim.Data.SQLite.dll"); | 341 | config.Set("storage_plugin", "OpenSim.Data.SQLite.dll"); |
343 | config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); | 342 | config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); |