Checks the number of ThreadPool and IOCP threads on startup and bumps up the numbers to .NET defaults of 500/1000 if need be
parent
9cb5db3621
commit
7199976d48
|
@ -91,6 +91,18 @@ namespace OpenSim
|
||||||
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
|
m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Increase the number of IOCP threads available. Mono defaults to a tragically low number
|
||||||
|
int workerThreads, iocpThreads;
|
||||||
|
System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
|
||||||
|
m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads);
|
||||||
|
if (workerThreads < 500 || iocpThreads < 1000)
|
||||||
|
{
|
||||||
|
workerThreads = 500;
|
||||||
|
iocpThreads = 1000;
|
||||||
|
m_log.Info("[OPENSIM MAIN]: Bumping up to 500 worker threads and 1000 IOCP threads");
|
||||||
|
System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if the system is compatible with OpenSimulator.
|
// Check if the system is compatible with OpenSimulator.
|
||||||
// Ensures that the minimum system requirements are met
|
// Ensures that the minimum system requirements are met
|
||||||
m_log.Info("Performing compatibility checks... ");
|
m_log.Info("Performing compatibility checks... ");
|
||||||
|
|
Loading…
Reference in New Issue