From 429a84f390212d0f414a08420707fc90aca2a331 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 5 Oct 2009 17:38:14 -0700 Subject: Beginning work on the new LLUDP implementation --- OpenSim/Region/Application/OpenSimBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 6e7a2a0..4592c31 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -675,7 +675,7 @@ namespace OpenSim if (foundClientServer) { - m_clientServers[clientServerElement].Server.Close(); + m_clientServers[clientServerElement].NetworkStop(); m_clientServers.RemoveAt(clientServerElement); } IScene scene; -- cgit v1.1 From 7199976d486eccb101b2942fe93a16df444bf73a Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 6 Oct 2009 15:51:56 -0700 Subject: Checks the number of ThreadPool and IOCP threads on startup and bumps up the numbers to .NET defaults of 500/1000 if need be --- OpenSim/Region/Application/Application.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Application') 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 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. // Ensures that the minimum system requirements are met m_log.Info("Performing compatibility checks... "); -- cgit v1.1