diff options
author | Oren Hurvitz | 2014-06-29 18:49:27 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-07-21 09:10:50 +0100 |
commit | af3498efdbd0b165a7e37095b1d8a9e54723993c (patch) | |
tree | 6ce955802b93f276b53e8a47f346222772e0a637 /OpenSim/Region/ClientStack | |
parent | Write UDP statistics to the log, not just the console (e.g., "show queues") (diff) | |
download | opensim-SC-af3498efdbd0b165a7e37095b1d8a9e54723993c.zip opensim-SC-af3498efdbd0b165a7e37095b1d8a9e54723993c.tar.gz opensim-SC-af3498efdbd0b165a7e37095b1d8a9e54723993c.tar.bz2 opensim-SC-af3498efdbd0b165a7e37095b1d8a9e54723993c.tar.xz |
In "show throttles", show the maximum drip rate. This shows whether a client is being throttled due to past poor performance.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 51433cb..39c9cb1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -202,7 +202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
202 | 202 | ||
203 | // Create a token bucket throttle for this client that has the scene token bucket as a parent | 203 | // Create a token bucket throttle for this client that has the scene token bucket as a parent |
204 | m_throttleClient = new AdaptiveTokenBucket(parentThrottle, rates.Total, rates.AdaptiveThrottlesEnabled); | 204 | m_throttleClient = new AdaptiveTokenBucket(parentThrottle, rates.Total, rates.AdaptiveThrottlesEnabled); |
205 | // Create a token bucket throttle for the total categary with the client bucket as a throttle | 205 | // Create a token bucket throttle for the total category with the client bucket as a throttle |
206 | m_throttleCategory = new TokenBucket(m_throttleClient, 0); | 206 | m_throttleCategory = new TokenBucket(m_throttleClient, 0); |
207 | // 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 |
208 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; | 208 | m_throttleCategories = new TokenBucket[THROTTLE_CATEGORY_COUNT]; |
@@ -262,6 +262,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
262 | m_info.assetThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate; | 262 | m_info.assetThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Asset].DripRate; |
263 | m_info.textureThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate; | 263 | m_info.textureThrottle = (int)m_throttleCategories[(int)ThrottleOutPacketType.Texture].DripRate; |
264 | m_info.totalThrottle = (int)m_throttleCategory.DripRate; | 264 | m_info.totalThrottle = (int)m_throttleCategory.DripRate; |
265 | m_info.maxThrottle = (int)m_throttleClient.MaxDripRate; | ||
265 | 266 | ||
266 | return m_info; | 267 | return m_info; |
267 | } | 268 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs index 4c33db5..0d4f549 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -335,13 +335,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
335 | // greater than this. | 335 | // greater than this. |
336 | // </summary> | 336 | // </summary> |
337 | protected Int64 m_maxDripRate = 0; | 337 | protected Int64 m_maxDripRate = 0; |
338 | protected Int64 MaxDripRate | 338 | public Int64 MaxDripRate |
339 | { | 339 | { |
340 | get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); } | 340 | get { return (m_maxDripRate == 0 ? m_totalDripRequest : m_maxDripRate); } |
341 | set { m_maxDripRate = (value == 0 ? 0 : Math.Max(value,m_minimumFlow)); } | 341 | protected set { m_maxDripRate = (value == 0 ? 0 : Math.Max(value,m_minimumFlow)); } |
342 | } | 342 | } |
343 | 343 | ||
344 | private bool m_enabled = false; | 344 | public bool Enabled { get; private set; } |
345 | 345 | ||
346 | // <summary> | 346 | // <summary> |
347 | // | 347 | // |
@@ -362,9 +362,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
362 | // </summary> | 362 | // </summary> |
363 | public AdaptiveTokenBucket(TokenBucket parent, Int64 maxDripRate, bool enabled) : base(parent,maxDripRate) | 363 | public AdaptiveTokenBucket(TokenBucket parent, Int64 maxDripRate, bool enabled) : base(parent,maxDripRate) |
364 | { | 364 | { |
365 | m_enabled = enabled; | 365 | Enabled = enabled; |
366 | 366 | ||
367 | if (m_enabled) | 367 | if (Enabled) |
368 | { | 368 | { |
369 | // m_log.DebugFormat("[TOKENBUCKET] Adaptive throttle enabled"); | 369 | // m_log.DebugFormat("[TOKENBUCKET] Adaptive throttle enabled"); |
370 | MaxDripRate = maxDripRate; | 370 | MaxDripRate = maxDripRate; |
@@ -378,7 +378,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
378 | public void ExpirePackets(Int32 count) | 378 | public void ExpirePackets(Int32 count) |
379 | { | 379 | { |
380 | // m_log.WarnFormat("[ADAPTIVEBUCKET] drop {0} by {1} expired packets",AdjustedDripRate,count); | 380 | // m_log.WarnFormat("[ADAPTIVEBUCKET] drop {0} by {1} expired packets",AdjustedDripRate,count); |
381 | if (m_enabled) | 381 | if (Enabled) |
382 | AdjustedDripRate = (Int64) (AdjustedDripRate / Math.Pow(2,count)); | 382 | AdjustedDripRate = (Int64) (AdjustedDripRate / Math.Pow(2,count)); |
383 | } | 383 | } |
384 | 384 | ||
@@ -387,7 +387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
387 | // </summary> | 387 | // </summary> |
388 | public void AcknowledgePackets(Int32 count) | 388 | public void AcknowledgePackets(Int32 count) |
389 | { | 389 | { |
390 | if (m_enabled) | 390 | if (Enabled) |
391 | AdjustedDripRate = AdjustedDripRate + count; | 391 | AdjustedDripRate = AdjustedDripRate + count; |
392 | } | 392 | } |
393 | } | 393 | } |