aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMic Bowman2014-01-20 18:59:43 -0800
committerMic Bowman2014-01-20 18:59:43 -0800
commit83626e60e69ac0534faffa40f9e79a5d3ae0d332 (patch)
tree01e37569e944e1f7063fc11aed8bd7d89eb08670
parentAdd back code to UuidGatherer to retrieve UUIDs for materials stored in DynAt... (diff)
downloadopensim-SC_OLD-83626e60e69ac0534faffa40f9e79a5d3ae0d332.zip
opensim-SC_OLD-83626e60e69ac0534faffa40f9e79a5d3ae0d332.tar.gz
opensim-SC_OLD-83626e60e69ac0534faffa40f9e79a5d3ae0d332.tar.bz2
opensim-SC_OLD-83626e60e69ac0534faffa40f9e79a5d3ae0d332.tar.xz
Adds a configuration option to cannibalize bandwidth from the
udp texture throttle and move it to the task throttle. Since most viewers are using http textures, the udp texture throttle is holding onto bw that could be used for more responsive prims updates. See the documentation for CannibalizeTextureRate in OpenSimDefaults.ini. Option is disabled by default.
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs14
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs6
-rw-r--r--bin/OpenSimDefaults.ini10
3 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index 202cc62..51433cb 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -162,6 +162,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
162 private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC 162 private int m_defaultRTO = 1000; // 1sec is the recommendation in the RFC
163 private int m_maxRTO = 60000; 163 private int m_maxRTO = 60000;
164 164
165 /// <summary>
166 /// This is the percentage of the udp texture queue to add to the task queue since
167 /// textures are now generally handled through http.
168 /// </summary>
169 private double m_cannibalrate = 0.0;
170
165 private ClientInfo m_info = new ClientInfo(); 171 private ClientInfo m_info = new ClientInfo();
166 172
167 /// <summary> 173 /// <summary>
@@ -201,6 +207,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
201 // Create an array of token buckets for this clients different throttle categories 207 // Create an array of token buckets for this clients different throttle categories
202 m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; 208 m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT];
203 209
210 m_cannibalrate = rates.CannibalizeTextureRate;
211
204 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++) 212 for (int i = 0; i < THROTTLE_CATEGORY_COUNT; i++)
205 { 213 {
206 ThrottleOutPacketType type = (ThrottleOutPacketType)i; 214 ThrottleOutPacketType type = (ThrottleOutPacketType)i;
@@ -349,6 +357,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
349 texture = Math.Max(texture, LLUDPServer.MTU); 357 texture = Math.Max(texture, LLUDPServer.MTU);
350 asset = Math.Max(asset, LLUDPServer.MTU); 358 asset = Math.Max(asset, LLUDPServer.MTU);
351 359
360 // Since most textures are now delivered through http, make it possible
361 // to cannibalize some of the bw from the texture throttle to use for
362 // the task queue (e.g. object updates)
363 task = task + (int)(m_cannibalrate * texture);
364 texture = (int)((1 - m_cannibalrate) * texture);
365
352 //int total = resend + land + wind + cloud + task + texture + asset; 366 //int total = resend + land + wind + cloud + task + texture + asset;
353 //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", 367 //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}",
354 // AgentID, resend, land, wind, cloud, task, texture, asset, total); 368 // AgentID, resend, land, wind, cloud, task, texture, asset, total);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
index c9aac0b..e5bae6e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
@@ -59,6 +59,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
59 /// <summary>Flag used to enable adaptive throttles</summary> 59 /// <summary>Flag used to enable adaptive throttles</summary>
60 public bool AdaptiveThrottlesEnabled; 60 public bool AdaptiveThrottlesEnabled;
61 61
62 /// <summary>Amount of the texture throttle to steal for the task throttle</summary>
63 public double CannibalizeTextureRate;
64
62 /// <summary> 65 /// <summary>
63 /// Default constructor 66 /// Default constructor
64 /// </summary> 67 /// </summary>
@@ -80,6 +83,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
80 Total = throttleConfig.GetInt("client_throttle_max_bps", 0); 83 Total = throttleConfig.GetInt("client_throttle_max_bps", 0);
81 84
82 AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false); 85 AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false);
86
87 CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f);
88 CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9);
83 } 89 }
84 catch (Exception) { } 90 catch (Exception) { }
85 } 91 }
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index ae7b794..0da99ba 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -539,6 +539,16 @@
539 ; 539 ;
540 ;TextureSendLimit = 20 540 ;TextureSendLimit = 20
541 541
542 ; CannibalizeTextureRate allows bandwidth to be moved from the
543 ; UDP texture throttle to the task throttle. Since most viewers
544 ; use HTTP textures, this provides a means of using what is largely
545 ; unused bandwidth in the total throttle. The value is the proportion
546 ; of the texture rate to move to the task queue. It must be between
547 ; 0.0 (none of the bandwidth is cannibalized) and 0.9 (90% of the
548 ; bandwidth is grabbed)
549 ;
550 ; CannibalizeTextureRate = 0.5
551
542 ; Quash and remove any light properties from attachments not on the 552 ; Quash and remove any light properties from attachments not on the
543 ; hands. This allows flashlights and lanterns to function, but kills 553 ; hands. This allows flashlights and lanterns to function, but kills
544 ; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps 554 ; silly vanity "Facelights" dead. Sorry, head mounted miner's lamps