diff options
author | Justin Clark-Casey (justincc) | 2014-08-19 00:11:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-08-19 00:17:12 +0100 |
commit | 84cea46c10e3f44c4d869d439a01ca7f80b56ece (patch) | |
tree | 3dbbbebb44fba4c2ac45046ed698752decf79d42 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |
parent | Make LLUDPServer.Scene publicly gettable/privately settable instead of protec... (diff) | |
download | opensim-SC_OLD-84cea46c10e3f44c4d869d439a01ca7f80b56ece.zip opensim-SC_OLD-84cea46c10e3f44c4d869d439a01ca7f80b56ece.tar.gz opensim-SC_OLD-84cea46c10e3f44c4d869d439a01ca7f80b56ece.tar.bz2 opensim-SC_OLD-84cea46c10e3f44c4d869d439a01ca7f80b56ece.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 2f363f4..c34bafa 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -650,8 +650,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
650 | 650 | ||
651 | if (HasUpdates(m_categories)) | 651 | if (HasUpdates(m_categories)) |
652 | { | 652 | { |
653 | // Asynchronously run the callback | 653 | if (!m_udpServer.OqrEngine.IsRunning) |
654 | Util.FireAndForget(FireQueueEmpty, categories); | 654 | { |
655 | // Asynchronously run the callback | ||
656 | Util.FireAndForget(FireQueueEmpty, categories); | ||
657 | } | ||
658 | else | ||
659 | { | ||
660 | m_udpServer.OqrEngine.QueueRequest(this, categories); | ||
661 | } | ||
655 | } | 662 | } |
656 | else | 663 | else |
657 | { | 664 | { |
@@ -670,7 +677,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
670 | /// <param name="o">Throttle categories to fire the callback for, | 677 | /// <param name="o">Throttle categories to fire the callback for, |
671 | /// stored as an object to match the WaitCallback delegate | 678 | /// stored as an object to match the WaitCallback delegate |
672 | /// signature</param> | 679 | /// signature</param> |
673 | private void FireQueueEmpty(object o) | 680 | public void FireQueueEmpty(object o) |
674 | { | 681 | { |
675 | // m_log.DebugFormat("[LLUDPCLIENT]: FireQueueEmpty for {0} in {1}", AgentID, m_udpServer.Scene.Name); | 682 | // m_log.DebugFormat("[LLUDPCLIENT]: FireQueueEmpty for {0} in {1}", AgentID, m_udpServer.Scene.Name); |
676 | 683 | ||