aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2019-11-22 07:42:00 +0000
committerUbitUmarov2019-11-22 07:42:00 +0000
commit2a508edcb41599fb32fa6e6ed20665f3857e86df (patch)
tree8f038475a6ab51a39749711887da6bc90065542b /OpenSim
parentYEngine, change default number of exec threads to 2 of priority Normal. Let t... (diff)
downloadopensim-SC-2a508edcb41599fb32fa6e6ed20665f3857e86df.zip
opensim-SC-2a508edcb41599fb32fa6e6ed20665f3857e86df.tar.gz
opensim-SC-2a508edcb41599fb32fa6e6ed20665f3857e86df.tar.bz2
opensim-SC-2a508edcb41599fb32fa6e6ed20665f3857e86df.tar.xz
YEngine: change some startup log messages
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMRScriptThread.cs4
2 files changed, 25 insertions, 23 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
index 5dcaa8f..f4cbc1f 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
122 public XMRInstQueue m_YieldQueue = new XMRInstQueue(); 122 public XMRInstQueue m_YieldQueue = new XMRInstQueue();
123 public XMRInstQueue m_SleepQueue = new XMRInstQueue(); 123 public XMRInstQueue m_SleepQueue = new XMRInstQueue();
124 private string m_LockedDict = "nobody"; 124 private string m_LockedDict = "nobody";
125 125 private ThreadPriority m_workersPrio;
126 public Yengine() 126 public Yengine()
127 { 127 {
128 } 128 }
@@ -250,43 +250,29 @@ namespace OpenSim.Region.ScriptEngine.Yengine
250 return; 250 return;
251 } 251 }
252 252
253 ThreadPriority workersPrio = ThreadPriority.Normal; 253 m_workersPrio = ThreadPriority.Normal;
254 switch (priority) 254 switch (priority)
255 { 255 {
256 case "Lowest": 256 case "Lowest":
257 workersPrio = ThreadPriority.Lowest; 257 m_workersPrio = ThreadPriority.Lowest;
258 break; 258 break;
259 case "BelowNormal": 259 case "BelowNormal":
260 workersPrio = ThreadPriority.BelowNormal; 260 m_workersPrio = ThreadPriority.BelowNormal;
261 break; 261 break;
262 case "Normal": 262 case "Normal":
263 workersPrio = ThreadPriority.Normal; 263 m_workersPrio = ThreadPriority.Normal;
264 break; 264 break;
265 case "AboveNormal": 265 case "AboveNormal":
266 workersPrio = ThreadPriority.AboveNormal; 266 m_workersPrio = ThreadPriority.AboveNormal;
267 break; 267 break;
268 case "Highest": 268 case "Highest":
269 workersPrio = ThreadPriority.Highest; 269 m_workersPrio = ThreadPriority.Highest;
270 break; 270 break;
271 default: 271 default:
272 m_log.ErrorFormat("[YEngine] Invalid thread priority: '{0}'. Assuming Normal", priority); 272 m_log.ErrorFormat("[YEngine] Invalid thread priority: '{0}'. Assuming Normal", priority);
273 break; 273 break;
274 } 274 }
275 m_SleepThread = StartMyThread(RunSleepThread, "Yengine sleep", ThreadPriority.Normal);
276 for(int i = 0; i < numThreadScriptWorkers; i++)
277 StartThreadWorker(i, workersPrio);
278 275
279 m_log.InfoFormat("[YEngine]: Enabled, {0}.{1} Meg (0x{2}) stacks",
280 (m_StackSize >> 20).ToString(),
281 (((m_StackSize % 0x100000) * 1000)
282 >> 20).ToString("D3"),
283 m_StackSize.ToString("X"));
284
285 m_log.InfoFormat("[YEngine]: ... {0}.{1} Meg (0x{2}) heaps",
286 (m_HeapSize >> 20).ToString(),
287 (((m_HeapSize % 0x100000) * 1000)
288 >> 20).ToString("D3"),
289 m_HeapSize.ToString("X"));
290 276
291 m_MaintenanceInterval = m_Config.GetInt("MaintenanceInterval", 10); 277 m_MaintenanceInterval = m_Config.GetInt("MaintenanceInterval", 10);
292 278
@@ -323,6 +309,22 @@ namespace OpenSim.Region.ScriptEngine.Yengine
323 309
324 Directory.CreateDirectory(m_ScriptBasePath); 310 Directory.CreateDirectory(m_ScriptBasePath);
325 311
312 string sceneName = m_Scene.Name;
313
314 m_log.InfoFormat("[YEngine]: Enabled for region {0}", sceneName);
315
316 m_log.InfoFormat("[YEngine]: {0}.{1}MB stacksize, {2}.{3}MB heapsize",
317 (m_StackSize >> 20).ToString(),
318 (((m_StackSize % 0x100000) * 1000)
319 >> 20).ToString("D3"),
320 (m_HeapSize >> 20).ToString(),
321 (((m_HeapSize % 0x100000) * 1000)
322 >> 20).ToString("D3"));
323
324 m_SleepThread = StartMyThread(RunSleepThread, "Yengine sleep" + " (" + sceneName + ")", ThreadPriority.Normal);
325 for (int i = 0; i < numThreadScriptWorkers; i++)
326 StartThreadWorker(i, m_workersPrio, sceneName);
327
326 m_Scene.EventManager.OnRezScript += OnRezScript; 328 m_Scene.EventManager.OnRezScript += OnRezScript;
327 329
328 m_Scene.StackModuleInterface<IScriptModule>(this); 330 m_Scene.StackModuleInterface<IScriptModule>(this);
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRScriptThread.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRScriptThread.cs
index c71eb81..27312f2 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMRScriptThread.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMRScriptThread.cs
@@ -56,11 +56,11 @@ namespace OpenSim.Region.ScriptEngine.Yengine
56 } 56 }
57 } 57 }
58 58
59 public void StartThreadWorker(int i, ThreadPriority priority) 59 public void StartThreadWorker(int i, ThreadPriority priority, string sceneName)
60 { 60 {
61 Thread thd; 61 Thread thd;
62 if(i >= 0) 62 if(i >= 0)
63 thd = Yengine.StartMyThread(RunScriptThread, "YScript" + i.ToString(), priority); 63 thd = Yengine.StartMyThread(RunScriptThread, "YScript" + i.ToString() + " (" + sceneName +")", priority);
64 else 64 else
65 thd = Yengine.StartMyThread(RunScriptThread, "YScript", priority); 65 thd = Yengine.StartMyThread(RunScriptThread, "YScript", priority);
66 lock(m_WakeUpLock) 66 lock(m_WakeUpLock)