Merge branch 'ubitworkmaster'
commit
298e714c04
|
@ -57,17 +57,28 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
private bool m_running = true;
|
||||
private int slowCount = 0;
|
||||
|
||||
private SmartThreadPool m_threadPool = new SmartThreadPool(20000, 12, 2);
|
||||
private SmartThreadPool m_threadPool;
|
||||
|
||||
public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
|
||||
{
|
||||
m_server = pSrv;
|
||||
m_WorkerThreadCount = pWorkerThreadCount;
|
||||
m_workerThreads = new Thread[m_WorkerThreadCount];
|
||||
|
||||
STPStartInfo startInfo = new STPStartInfo();
|
||||
startInfo.IdleTimeout = 30000;
|
||||
startInfo.MaxWorkerThreads = 15;
|
||||
startInfo.MinWorkerThreads = 1;
|
||||
startInfo.ThreadPriority = ThreadPriority.Normal;
|
||||
startInfo.StartSuspended = true;
|
||||
startInfo.ThreadPoolName = "PoolService";
|
||||
|
||||
m_threadPool = new SmartThreadPool(startInfo);
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
m_threadPool.Start();
|
||||
//startup worker threads
|
||||
for (uint i = 0; i < m_WorkerThreadCount; i++)
|
||||
{
|
||||
|
|
|
@ -1850,7 +1850,7 @@ namespace OpenSim.Framework
|
|||
|
||||
STPStartInfo startInfo = new STPStartInfo();
|
||||
startInfo.ThreadPoolName = "Util";
|
||||
startInfo.IdleTimeout = 2000;
|
||||
startInfo.IdleTimeout = 20000;
|
||||
startInfo.MaxWorkerThreads = maxThreads;
|
||||
startInfo.MinWorkerThreads = minThreads;
|
||||
|
||||
|
|
|
@ -113,8 +113,8 @@ namespace OpenSim
|
|||
if (!String.IsNullOrEmpty(asyncCallMethodStr) && Utils.EnumTryParse<FireAndForgetMethod>(asyncCallMethodStr, out asyncCallMethod))
|
||||
Util.FireAndForgetMethod = asyncCallMethod;
|
||||
|
||||
stpMinThreads = startupConfig.GetInt("MinPoolThreads", 15);
|
||||
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
|
||||
stpMinThreads = startupConfig.GetInt("MinPoolThreads", 2 );
|
||||
stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 25);
|
||||
m_consolePrompt = startupConfig.GetString("ConsolePrompt", @"Region (\R) ");
|
||||
}
|
||||
|
||||
|
|
|
@ -1305,7 +1305,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
PacketsSentCount++;
|
||||
|
||||
// Put the UDP payload on the wire
|
||||
AsyncBeginSend(buffer);
|
||||
//AsyncBeginSend(buffer);
|
||||
SyncSend(buffer);
|
||||
|
||||
// Keep track of when this packet was sent out (right now)
|
||||
outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
|
||||
|
|
|
@ -375,12 +375,28 @@ namespace OpenMetaverse
|
|||
|
||||
// Synchronous mode waits until the packet callback completes
|
||||
// before starting the receive to fetch another packet
|
||||
if (!m_asyncPacketHandling)
|
||||
// if (!m_asyncPacketHandling)
|
||||
AsyncBeginReceive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SyncSend(UDPPacketBuffer buf)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_udpSocket.SendTo(
|
||||
buf.Data,
|
||||
0,
|
||||
buf.DataLength,
|
||||
SocketFlags.None,
|
||||
buf.RemoteEndPoint
|
||||
);
|
||||
}
|
||||
catch (SocketException) { }
|
||||
catch (ObjectDisposedException) { }
|
||||
}
|
||||
|
||||
public void AsyncBeginSend(UDPPacketBuffer buf)
|
||||
{
|
||||
// if (IsRunningOutbound)
|
||||
|
|
|
@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
m_proxyurl = config.Configs["Startup"].GetString("HttpProxy");
|
||||
m_proxyexcepts = config.Configs["Startup"].GetString("HttpProxyExceptions");
|
||||
|
||||
int maxThreads = 50;
|
||||
int maxThreads = 15;
|
||||
|
||||
IConfig httpConfig = config.Configs["HttpRequestModule"];
|
||||
if (httpConfig != null)
|
||||
|
@ -336,12 +336,12 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
|||
STPStartInfo startInfo = new STPStartInfo();
|
||||
startInfo.IdleTimeout = 20000;
|
||||
startInfo.MaxWorkerThreads = maxThreads;
|
||||
startInfo.MinWorkerThreads = 5;
|
||||
startInfo.MinWorkerThreads = 1;
|
||||
startInfo.ThreadPriority = ThreadPriority.BelowNormal;
|
||||
startInfo.StartSuspended = true;
|
||||
startInfo.ThreadPoolName = "ScriptsHttpReq";
|
||||
|
||||
ThreadPool = new SmartThreadPool(startInfo);
|
||||
|
||||
ThreadPool.Start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
}
|
||||
m_running = true;
|
||||
m_thread = new Thread(DoWork);
|
||||
m_thread.Name = "OdeMeshWorker";
|
||||
m_thread.Start();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue