aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2014-10-13 23:27:13 +0200
committerMelanie Thielker2014-10-13 23:27:13 +0200
commit298e714c048c541bcd7cf8c4f321f4d52f0d3b61 (patch)
tree5b2727dd5f773d139f1a0932d0080f9c2dac8833 /OpenSim
parentAllow 20 outbound connections per endpoint for the services (diff)
parent*TEST* send udp sync. Stop uncontroled and hidden use of IO threads. (diff)
downloadopensim-SC-298e714c048c541bcd7cf8c4f321f4d52f0d3b61.zip
opensim-SC-298e714c048c541bcd7cf8c4f321f4d52f0d3b61.tar.gz
opensim-SC-298e714c048c541bcd7cf8c4f321f4d52f0d3b61.tar.bz2
opensim-SC-298e714c048c541bcd7cf8c4f321f4d52f0d3b61.tar.xz
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs15
-rw-r--r--OpenSim/Framework/Util.cs2
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs3
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs18
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs6
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs1
7 files changed, 39 insertions, 10 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 4058229..e75b705 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -57,24 +57,35 @@ namespace OpenSim.Framework.Servers.HttpServer
57 private bool m_running = true; 57 private bool m_running = true;
58 private int slowCount = 0; 58 private int slowCount = 0;
59 59
60 private SmartThreadPool m_threadPool = new SmartThreadPool(20000, 12, 2); 60 private SmartThreadPool m_threadPool;
61 61
62 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) 62 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
63 { 63 {
64 m_server = pSrv; 64 m_server = pSrv;
65 m_WorkerThreadCount = pWorkerThreadCount; 65 m_WorkerThreadCount = pWorkerThreadCount;
66 m_workerThreads = new Thread[m_WorkerThreadCount]; 66 m_workerThreads = new Thread[m_WorkerThreadCount];
67
68 STPStartInfo startInfo = new STPStartInfo();
69 startInfo.IdleTimeout = 30000;
70 startInfo.MaxWorkerThreads = 15;
71 startInfo.MinWorkerThreads = 1;
72 startInfo.ThreadPriority = ThreadPriority.Normal;
73 startInfo.StartSuspended = true;
74 startInfo.ThreadPoolName = "PoolService";
75
76 m_threadPool = new SmartThreadPool(startInfo);
67 } 77 }
68 78
69 public void Start() 79 public void Start()
70 { 80 {
81 m_threadPool.Start();
71 //startup worker threads 82 //startup worker threads
72 for (uint i = 0; i < m_WorkerThreadCount; i++) 83 for (uint i = 0; i < m_WorkerThreadCount; i++)
73 { 84 {
74 m_workerThreads[i] 85 m_workerThreads[i]
75 = Watchdog.StartThread( 86 = Watchdog.StartThread(
76 PoolWorkerJob, 87 PoolWorkerJob,
77 string.Format("PollServiceWorkerThread{0}:{1}", i, m_server.Port), 88 string.Format("PollServiceWorkerThread {0}:{1}", i, m_server.Port),
78 ThreadPriority.Normal, 89 ThreadPriority.Normal,
79 false, 90 false,
80 false, 91 false,
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index b8b78fa..d807e2a 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1850,7 +1850,7 @@ namespace OpenSim.Framework
1850 1850
1851 STPStartInfo startInfo = new STPStartInfo(); 1851 STPStartInfo startInfo = new STPStartInfo();
1852 startInfo.ThreadPoolName = "Util"; 1852 startInfo.ThreadPoolName = "Util";
1853 startInfo.IdleTimeout = 2000; 1853 startInfo.IdleTimeout = 20000;
1854 startInfo.MaxWorkerThreads = maxThreads; 1854 startInfo.MaxWorkerThreads = maxThreads;
1855 startInfo.MinWorkerThreads = minThreads; 1855 startInfo.MinWorkerThreads = minThreads;
1856 1856
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index e1e3d87..369e79d 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -113,8 +113,8 @@ namespace OpenSim
113 if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod)) 113 if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod))
114 Util.FireAndForgetMethod = asyncCallMethod; 114 Util.FireAndForgetMethod = asyncCallMethod;
115 115
116 stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15); 116 stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 );
117 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); 117 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25);
118 m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) "); 118 m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) ");
119 } 119 }
120 120
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 99e7aba..ac4a877 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1305,7 +1305,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1305 PacketsSentCount++; 1305 PacketsSentCount++;
1306 1306
1307 // Put the UDP payload on the wire 1307 // Put the UDP payload on the wire
1308 AsyncBeginSend(buffer); 1308 //AsyncBeginSend(buffer);
1309 SyncSend(buffer);
1309 1310
1310 // Keep track of when this packet was sent out (right now) 1311 // Keep track of when this packet was sent out (right now)
1311 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; 1312 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 881e768..1d76c14 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -375,12 +375,28 @@ namespace OpenMetaverse
375 375
376 // Synchronous mode waits until the packet callback completes 376 // Synchronous mode waits until the packet callback completes
377 // before starting the receive to fetch another packet 377 // before starting the receive to fetch another packet
378 if (!m_asyncPacketHandling) 378// if (!m_asyncPacketHandling)
379 AsyncBeginReceive(); 379 AsyncBeginReceive();
380 } 380 }
381 } 381 }
382 } 382 }
383 383
384 public void SyncSend(UDPPacketBuffer buf)
385 {
386 try
387 {
388 m_udpSocket.SendTo(
389 buf.Data,
390 0,
391 buf.DataLength,
392 SocketFlags.None,
393 buf.RemoteEndPoint
394 );
395 }
396 catch (SocketException) { }
397 catch (ObjectDisposedException) { }
398 }
399
384 public void AsyncBeginSend(UDPPacketBuffer buf) 400 public void AsyncBeginSend(UDPPacketBuffer buf)
385 { 401 {
386// if (IsRunningOutbound) 402// if (IsRunningOutbound)
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index d27869a..6880f56 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
320 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy"); 320 m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
321 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions"); 321 m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
322 322
323 int maxThreads = 50; 323 int maxThreads = 15;
324 324
325 IConfig httpConfig = config.Configs["HttpRequestModule"]; 325 IConfig httpConfig = config.Configs["HttpRequestModule"];
326 if (httpConfig != null) 326 if (httpConfig != null)
@@ -336,12 +336,12 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
336 STPStartInfo startInfo = new STPStartInfo(); 336 STPStartInfo startInfo = new STPStartInfo();
337 startInfo.IdleTimeout = 20000; 337 startInfo.IdleTimeout = 20000;
338 startInfo.MaxWorkerThreads = maxThreads; 338 startInfo.MaxWorkerThreads = maxThreads;
339 startInfo.MinWorkerThreads = 5; 339 startInfo.MinWorkerThreads = 1;
340 startInfo.ThreadPriority = ThreadPriority.BelowNormal; 340 startInfo.ThreadPriority = ThreadPriority.BelowNormal;
341 startInfo.StartSuspended = true; 341 startInfo.StartSuspended = true;
342 startInfo.ThreadPoolName = "ScriptsHttpReq";
342 343
343 ThreadPool = new SmartThreadPool(startInfo); 344 ThreadPool = new SmartThreadPool(startInfo);
344
345 ThreadPool.Start(); 345 ThreadPool.Start();
346 } 346 }
347 } 347 }
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
index 5030cec..a6bdaa0 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
@@ -100,6 +100,7 @@ namespace OpenSim.Region.Physics.OdePlugin
100 } 100 }
101 m_running = true; 101 m_running = true;
102 m_thread = new Thread(DoWork); 102 m_thread = new Thread(DoWork);
103 m_thread.Name = "OdeMeshWorker";
103 m_thread.Start(); 104 m_thread.Start();
104 } 105 }
105 106