change llclient async udp packets processing. Removed the shared Jobengine that made only one thread do some packets for all users, and removed the FireAndForget, so each user could issue a unlimited number of threads. Added a new JobEngine per client, so each gets at most one thread,and that thread can be released if iddle (for 5 seconds )

This commit is contained in:
UbitUmarov
2017-06-13 19:04:18 +01:00
parent 482ff06e13
commit ad43cc6784
2 changed files with 15 additions and 11 deletions

View File

@@ -414,7 +414,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Queue some low priority but potentially high volume async requests so that they don't overwhelm available
/// threadpool threads.
/// </summary>
public JobEngine IpahEngine { get; protected set; }
// public JobEngine IpahEngine { get; protected set; }
/// <summary>
/// Run queue empty processing within a single persistent thread.
@@ -527,7 +527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
StartInbound();
StartOutbound();
IpahEngine.Start();
// IpahEngine.Start();
OqrEngine.Start();
m_elapsedMSSinceLastStatReport = Environment.TickCount;
@@ -572,7 +572,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_log.Info("[LLUDPSERVER]: Shutting down the LLUDP server for " + Scene.Name);
base.StopOutbound();
base.StopInbound();
IpahEngine.Stop();
// IpahEngine.Stop();
OqrEngine.Stop();
}
@@ -691,12 +691,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Scene = (Scene)scene;
m_location = new Location(Scene.RegionInfo.RegionHandle);
/*
IpahEngine
= new JobEngine(
string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name),
"INCOMING PACKET ASYNC HANDLING ENGINE");
*/
OqrEngine
= new JobEngine(
string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
@@ -781,7 +781,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
MeasuresOfInterest.AverageChangeOverTime,
stat => stat.Value = GetTotalQueuedOutgoingPackets(),
StatVerbosity.Info));
/*
StatsManager.RegisterStat(
new Stat(
"IncomingPacketAsyncRequestsWaiting",
@@ -794,7 +794,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
MeasuresOfInterest.None,
stat => stat.Value = IpahEngine.JobsWaiting,
StatVerbosity.Debug));
*/
StatsManager.RegisterStat(
new Stat(
"OQRERequestsWaiting",