aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-06 15:51:56 -0700
committerJohn Hurliman2009-10-06 15:51:56 -0700
commit7199976d486eccb101b2942fe93a16df444bf73a (patch)
treeba20fade5e9e32c428791fbe3cefeca83a8e7984 /OpenSim/Region/Application
parentApplying the real fix (thank you for tracking that MSDN doc down Melanie) (diff)
downloadopensim-SC-7199976d486eccb101b2942fe93a16df444bf73a.zip
opensim-SC-7199976d486eccb101b2942fe93a16df444bf73a.tar.gz
opensim-SC-7199976d486eccb101b2942fe93a16df444bf73a.tar.bz2
opensim-SC-7199976d486eccb101b2942fe93a16df444bf73a.tar.xz
Checks the number of ThreadPool and IOCP threads on startup and bumps up the numbers to .NET defaults of 500/1000 if need be
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r--OpenSim/Region/Application/Application.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 33b01e5..555baa4 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -91,6 +91,18 @@ namespace OpenSim
91 m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config"); 91 m_log.Info("[OPENSIM MAIN]: configured log4net using default OpenSim.exe.config");
92 } 92 }
93 93
94 // Increase the number of IOCP threads available. Mono defaults to a tragically low number
95 int workerThreads, iocpThreads;
96 System.Threading.ThreadPool.GetMaxThreads(out workerThreads, out iocpThreads);
97 m_log.InfoFormat("[OPENSIM MAIN]: Runtime gave us {0} worker threads and {1} IOCP threads", workerThreads, iocpThreads);
98 if (workerThreads < 500 || iocpThreads < 1000)
99 {
100 workerThreads = 500;
101 iocpThreads = 1000;
102 m_log.Info("[OPENSIM MAIN]: Bumping up to 500 worker threads and 1000 IOCP threads");
103 System.Threading.ThreadPool.SetMaxThreads(workerThreads, iocpThreads);
104 }
105
94 // Check if the system is compatible with OpenSimulator. 106 // Check if the system is compatible with OpenSimulator.
95 // Ensures that the minimum system requirements are met 107 // Ensures that the minimum system requirements are met
96 m_log.Info("Performing compatibility checks... "); 108 m_log.Info("Performing compatibility checks... ");