diff options
author | Oren Hurvitz | 2014-06-29 18:49:27 +0300 |
---|---|---|
committer | Justin Clark-Casey | 2014-08-02 00:56:26 +0100 |
commit | d616f75d9a5f86da911a7da367b1a911d3d290f0 (patch) | |
tree | 56230df3f1d64e32ee4eea466734fc1f506097e5 | |
parent | Include the group name in group IM's (diff) | |
download | opensim-SC-d616f75d9a5f86da911a7da367b1a911d3d290f0.zip opensim-SC-d616f75d9a5f86da911a7da367b1a911d3d290f0.tar.gz opensim-SC-d616f75d9a5f86da911a7da367b1a911d3d290f0.tar.bz2 opensim-SC-d616f75d9a5f86da911a7da367b1a911d3d290f0.tar.xz |
In "show throttles", show the maximum drip rate. This shows whether a client is being throttled due to past poor performance.
4 files changed, 20 insertions, 14 deletions
diff --git a/OpenSim/Framework/ClientInfo.cs b/OpenSim/Framework/ClientInfo.cs index 9021315..d68078e 100644 --- a/OpenSim/Framework/ClientInfo.cs +++ b/OpenSim/Framework/ClientInfo.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Framework | |||
54 | public int assetThrottle; | 54 | public int assetThrottle; |
55 | public int textureThrottle; | 55 | public int textureThrottle; |
56 | public int totalThrottle; | 56 | public int totalThrottle; |
57 | public int maxThrottle; | ||
57 | 58 | ||
58 | public Dictionary<string, int> SyncRequests = new Dictionary<string,int>(); | 59 | public Dictionary<string, int> SyncRequests = new Dictionary<string,int>(); |
59 | public Dictionary<string, int> AsyncRequests = new Dictionary<string,int>(); | 60 | public Dictionary<string, int> AsyncRequests = new Dictionary<string,int>(); |
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 | } |
diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 44d4e93..2ef3c4c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | |||
@@ -487,7 +487,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
487 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); | 487 | report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); |
488 | 488 | ||
489 | report.AppendFormat( | 489 | report.AppendFormat( |
490 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", | 490 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", |
491 | "Max", | ||
491 | "Total", | 492 | "Total", |
492 | "Resend", | 493 | "Resend", |
493 | "Land", | 494 | "Land", |
@@ -499,7 +500,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
499 | 500 | ||
500 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); | 501 | report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); |
501 | report.AppendFormat( | 502 | report.AppendFormat( |
502 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", | 503 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", |
504 | "kb/s", | ||
503 | "kb/s", | 505 | "kb/s", |
504 | "kb/s", | 506 | "kb/s", |
505 | "kb/s", | 507 | "kb/s", |
@@ -548,7 +550,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
548 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); | 550 | report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); |
549 | 551 | ||
550 | report.AppendFormat( | 552 | report.AppendFormat( |
551 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", | 553 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", |
554 | (ci.maxThrottle * 8) / 1000, | ||
552 | (ci.totalThrottle * 8) / 1000, | 555 | (ci.totalThrottle * 8) / 1000, |
553 | (ci.resendThrottle * 8) / 1000, | 556 | (ci.resendThrottle * 8) / 1000, |
554 | (ci.landThrottle * 8) / 1000, | 557 | (ci.landThrottle * 8) / 1000, |
@@ -584,7 +587,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden | |||
584 | 587 | ||
585 | ThrottleRates throttleRates = udpServer.ThrottleRates; | 588 | ThrottleRates throttleRates = udpServer.ThrottleRates; |
586 | report.AppendFormat( | 589 | report.AppendFormat( |
587 | "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", | 590 | "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", |
591 | "-", | ||
588 | (throttleRates.Total * 8) / 1000, | 592 | (throttleRates.Total * 8) / 1000, |
589 | (throttleRates.Resend * 8) / 1000, | 593 | (throttleRates.Resend * 8) / 1000, |
590 | (throttleRates.Land * 8) / 1000, | 594 | (throttleRates.Land * 8) / 1000, |