mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Add incoming packet async handling engine to queue some inbound udp async requests.
This is to reduce the potential for overload of the threadpool if there are many simultaneous requets in high concurrency situations. Currently only applied to AvatarProperties and GenericMessage requests.
This commit is contained in:
@@ -363,6 +363,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
/// </summary>
|
||||
private IClientAPI m_currentIncomingClient;
|
||||
|
||||
/// <summary>
|
||||
/// Queue some low priority but potentially high volume async requests so that they don't overwhelm available
|
||||
/// threadpool threads.
|
||||
/// </summary>
|
||||
public IncomingPacketAsyncHandlingEngine IpahEngine { get; private set; }
|
||||
|
||||
/// <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
|
||||
@@ -454,6 +460,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
if (usePools)
|
||||
EnablePools();
|
||||
|
||||
IpahEngine = new IncomingPacketAsyncHandlingEngine(this);
|
||||
OqrEngine = new OutgoingQueueRefillEngine(this);
|
||||
}
|
||||
|
||||
@@ -461,6 +468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
StartInbound();
|
||||
StartOutbound();
|
||||
IpahEngine.Start();
|
||||
OqrEngine.Start();
|
||||
|
||||
m_elapsedMSSinceLastStatReport = Environment.TickCount;
|
||||
@@ -506,6 +514,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
m_log.Info("[LLUDPSERVER]: Shutting down the LLUDP server for " + Scene.Name);
|
||||
base.StopOutbound();
|
||||
base.StopInbound();
|
||||
IpahEngine.Stop();
|
||||
OqrEngine.Stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user