aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs52
1 files changed, 44 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 2f97516..7bd16e6 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -367,14 +367,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
367 /// Queue some low priority but potentially high volume async requests so that they don't overwhelm available 367 /// Queue some low priority but potentially high volume async requests so that they don't overwhelm available
368 /// threadpool threads. 368 /// threadpool threads.
369 /// </summary> 369 /// </summary>
370 public IncomingPacketAsyncHandlingEngine IpahEngine { get; private set; } 370 public JobEngine IpahEngine { get; private set; }
371 371
372 /// <summary> 372 /// <summary>
373 /// Experimental facility to run queue empty processing within a controlled number of threads rather than 373 /// Run queue empty processing within a single persistent thread.
374 /// requiring massive numbers of short-lived threads from the threadpool when there are a high number of
375 /// connections.
376 /// </summary> 374 /// </summary>
377 public OutgoingQueueRefillEngine OqrEngine { get; private set; } 375 /// <remarks>
376 /// This is the alternative to having every
377 /// connection schedule its own job in the threadpool which causes performance problems when there are many
378 /// connections.
379 /// </remarks>
380 public JobEngine OqrEngine { get; private set; }
378 381
379 public LLUDPServer( 382 public LLUDPServer(
380 IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, 383 IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port,
@@ -459,9 +462,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
459 462
460 if (usePools) 463 if (usePools)
461 EnablePools(); 464 EnablePools();
462
463 IpahEngine = new IncomingPacketAsyncHandlingEngine(this);
464 OqrEngine = new OutgoingQueueRefillEngine(this);
465 } 465 }
466 466
467 public void Start() 467 public void Start()
@@ -633,6 +633,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
633 633
634 Scene = (Scene)scene; 634 Scene = (Scene)scene;
635 m_location = new Location(Scene.RegionInfo.RegionHandle); 635 m_location = new Location(Scene.RegionInfo.RegionHandle);
636
637 IpahEngine
638 = new JobEngine(
639 string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name),
640 "INCOMING PACKET ASYNC HANDLING ENGINE");
641
642 OqrEngine
643 = new JobEngine(
644 string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
645 "OUTGOING QUEUE REFILL ENGINE");
636 646
637 StatsManager.RegisterStat( 647 StatsManager.RegisterStat(
638 new Stat( 648 new Stat(
@@ -713,6 +723,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
713 MeasuresOfInterest.AverageChangeOverTime, 723 MeasuresOfInterest.AverageChangeOverTime,
714 stat => stat.Value = GetTotalQueuedOutgoingPackets(), 724 stat => stat.Value = GetTotalQueuedOutgoingPackets(),
715 StatVerbosity.Info)); 725 StatVerbosity.Info));
726
727 StatsManager.RegisterStat(
728 new Stat(
729 "IncomingPacketAsyncRequestsWaiting",
730 "Number of incoming packets waiting for async processing in engine.",
731 "",
732 "",
733 "clientstack",
734 Scene.Name,
735 StatType.Pull,
736 MeasuresOfInterest.None,
737 stat => stat.Value = IpahEngine.JobsWaiting,
738 StatVerbosity.Debug));
739
740 StatsManager.RegisterStat(
741 new Stat(
742 "OQRERequestsWaiting",
743 "Number of outgong queue refill requests waiting for processing.",
744 "",
745 "",
746 "clientstack",
747 Scene.Name,
748 StatType.Pull,
749 MeasuresOfInterest.None,
750 stat => stat.Value = OqrEngine.JobsWaiting,
751 StatVerbosity.Debug));
716 752
717 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by 753 // We delay enabling pool stats to AddScene() instead of Initialize() so that we can distinguish pool stats by
718 // scene name 754 // scene name