diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs | 6 |
2 files changed, 20 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 | } |