mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 10:15:33 +08:00
Add experimental OutgoingQueueRefillEngine to handle queue refill processing on a controlled number of threads rather than the threadpool.
Disabled by default. Currently can only be enabled with console "debug lludp oqre start" command, though this can be started and stopped whilst simulator is running. When a connection requires packet queue refill processing (used to populate queues with entity updates, entity prop updates and image queue updates), this is done via Threadpool requests. However, with a very high number of connections (e.g. 100 root + 300 child) a very large number of simultaneous requests may be causing performance issues. This commit adds an experimental engine for processing these requests from a queue with a persistent thread instead. Unlike inbound processing, there are no network requests in this processing that might hold the thread up for a long time. Early implementation - currently only one thread which may (or may not) get overloaded with requests. Added for testing purposes.
This commit is contained in:
@@ -355,6 +355,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// </summary>
|
||||
private IClientAPI m_currentIncomingClient;
|
||||
|
||||
/// <summary>
|
||||
/// Experimental facility to run queue empty processing within a controlled number of threads rather than
|
||||
/// requiring massive numbers of short-lived threads from the threadpool when there are a high number of
|
||||
/// connections.
|
||||
/// </summary>
|
||||
public OutgoingQueueRefillEngine OqrEngine { get; private set; }
|
||||
|
||||
public LLUDPServer(
|
||||
IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port,
|
||||
IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||
@@ -432,6 +439,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
if (usePools)
|
||||
EnablePools();
|
||||
|
||||
OqrEngine = new OutgoingQueueRefillEngine(this);
|
||||
}
|
||||
|
||||
public void Start()
|
||||
@@ -469,7 +478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
Watchdog.StartThread(
|
||||
OutgoingPacketHandler,
|
||||
string.Format("Outgoing Packets ({0})", Scene.RegionInfo.RegionName),
|
||||
string.Format("Outgoing Packets ({0})", Scene.Name),
|
||||
ThreadPriority.Normal,
|
||||
false,
|
||||
true,
|
||||
@@ -479,7 +488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_log.Info("[LLUDPSERVER]: Shutting down the LLUDP server for " + Scene.RegionInfo.RegionName);
|
||||
m_log.Info("[LLUDPSERVER]: Shutting down the LLUDP server for " + Scene.Name);
|
||||
base.StopOutbound();
|
||||
base.StopInbound();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user