diff options
author | Mic Bowman | 2011-04-25 10:44:41 -0700 |
---|---|---|
committer | Mic Bowman | 2011-04-25 10:44:41 -0700 |
commit | 024c12abc3aa42432e55e322141cad1edeb5bad1 (patch) | |
tree | 3666d30003824cd34bb002375b2d5b31bcb7addd /OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |
parent | Merge branch 'master' into queuetest (diff) | |
download | opensim-SC-024c12abc3aa42432e55e322141cad1edeb5bad1.zip opensim-SC-024c12abc3aa42432e55e322141cad1edeb5bad1.tar.gz opensim-SC-024c12abc3aa42432e55e322141cad1edeb5bad1.tar.bz2 opensim-SC-024c12abc3aa42432e55e322141cad1edeb5bad1.tar.xz |
Cleaned up various configuration options. Removed the category throttle
limits because the only ones used now are the defaults (which are overwritten
by the client throttles anyway). Updated the default rates to correspond to
about 350kbps.
Also added a configuration to disable adaptive throttle. The default
is the previous behavior (no adaptation).
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 103ec66..494cb0c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -181,9 +181,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
181 | m_maxRTO = maxRTO; | 181 | m_maxRTO = maxRTO; |
182 | 182 | ||
183 | // Create a token bucket throttle for this client that has the scene token bucket as a parent | 183 | // Create a token bucket throttle for this client that has the scene token bucket as a parent |
184 | m_throttleClient = new AdaptiveTokenBucket(parentThrottle, rates.TotalLimit); | 184 | m_throttleClient = new AdaptiveTokenBucket(parentThrottle, rates.Total, rates.AdaptiveThrottlesEnabled); |
185 | // Create a token bucket throttle for the total categary with the client bucket as a throttle | 185 | // Create a token bucket throttle for the total categary with the client bucket as a throttle |
186 | m_throttleCategory = new TokenBucket(m_throttleClient, rates.TotalLimit); | 186 | m_throttleCategory = new TokenBucket(m_throttleClient, rates.Total); |
187 | // Create an array of token buckets for this clients different throttle categories | 187 | // Create an array of token buckets for this clients different throttle categories |
188 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; | 188 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; |
189 | 189 | ||
@@ -194,7 +194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
194 | // Initialize the packet outboxes, where packets sit while they are waiting for tokens | 194 | // Initialize the packet outboxes, where packets sit while they are waiting for tokens |
195 | m_packetOutboxes[i] = new OpenSim.Framework.LocklessQueue<OutgoingPacket>(); | 195 | m_packetOutboxes[i] = new OpenSim.Framework.LocklessQueue<OutgoingPacket>(); |
196 | // Initialize the token buckets that control the throttling for each category | 196 | // Initialize the token buckets that control the throttling for each category |
197 | m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetLimit(type)); | 197 | m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetRate(type)); |
198 | } | 198 | } |
199 | 199 | ||
200 | // Default the retransmission timeout to three seconds | 200 | // Default the retransmission timeout to three seconds |
@@ -341,12 +341,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
341 | task = Math.Max(task, LLUDPServer.MTU); | 341 | task = Math.Max(task, LLUDPServer.MTU); |
342 | texture = Math.Max(texture, LLUDPServer.MTU); | 342 | texture = Math.Max(texture, LLUDPServer.MTU); |
343 | asset = Math.Max(asset, LLUDPServer.MTU); | 343 | asset = Math.Max(asset, LLUDPServer.MTU); |
344 | state = Math.Max(state, LLUDPServer.MTU); | ||
345 | 344 | ||
346 | int total = resend + land + wind + cloud + task + texture + asset + state; | 345 | int total = resend + land + wind + cloud + task + texture + asset; |
347 | 346 | ||
348 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, State={8}, Total={9}", | 347 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", |
349 | // AgentID, resend, land, wind, cloud, task, texture, asset, state, total); | 348 | // AgentID, resend, land, wind, cloud, task, texture, asset, total); |
350 | 349 | ||
351 | // Update the token buckets with new throttle values | 350 | // Update the token buckets with new throttle values |
352 | TokenBucket bucket; | 351 | TokenBucket bucket; |