diff options
author | UbitUmarov | 2019-04-16 19:07:26 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-16 19:07:26 +0100 |
commit | 11cad57c9cac5c17a9d658da7ec2e8c4b5cc75d1 (patch) | |
tree | c619bd9d83fbdddd7022df4290008c427c897550 /OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |
parent | Yengine: rename a field, do some updates using interlocked (diff) | |
download | opensim-SC-11cad57c9cac5c17a9d658da7ec2e8c4b5cc75d1.zip opensim-SC-11cad57c9cac5c17a9d658da7ec2e8c4b5cc75d1.tar.gz opensim-SC-11cad57c9cac5c17a9d658da7ec2e8c4b5cc75d1.tar.bz2 opensim-SC-11cad57c9cac5c17a9d658da7ec2e8c4b5cc75d1.tar.xz |
lludp: change burst, make it per category (overall reduction)
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index f812ce1..7c8e226 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -260,7 +260,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
260 | // Initialize the packet outboxes, where packets sit while they are waiting for tokens | 260 | // Initialize the packet outboxes, where packets sit while they are waiting for tokens |
261 | m_packetOutboxes[i] = new DoubleLocklessQueue<OutgoingPacket>(); | 261 | m_packetOutboxes[i] = new DoubleLocklessQueue<OutgoingPacket>(); |
262 | // Initialize the token buckets that control the throttling for each category | 262 | // Initialize the token buckets that control the throttling for each category |
263 | m_throttleCategories[i] = new TokenBucket(m_throttleClient, rates.GetRate(type), m_burst); | 263 | //m_throttleCategories[i] = new TokenBucket(m_throttleClient, rates.GetRate(type), m_burst); |
264 | float rate = rates.GetRate(type); | ||
265 | float burst = rate * rates.BrustTime; | ||
266 | m_throttleCategories[i] = new TokenBucket(m_throttleClient, rate , burst); | ||
264 | } | 267 | } |
265 | 268 | ||
266 | // Default the retransmission timeout to one second | 269 | // Default the retransmission timeout to one second |
@@ -443,7 +446,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
443 | 446 | ||
444 | int total = resend + land + wind + cloud + task + texture + asset; | 447 | int total = resend + land + wind + cloud + task + texture + asset; |
445 | 448 | ||
446 | float m_burst = total * m_burstTime; | 449 | //float m_burst = total * m_burstTime; |
447 | 450 | ||
448 | if (ThrottleDebugLevel > 0) | 451 | if (ThrottleDebugLevel > 0) |
449 | { | 452 | { |
@@ -453,7 +456,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
453 | } | 456 | } |
454 | 457 | ||
455 | TokenBucket bucket; | 458 | TokenBucket bucket; |
456 | 459 | /* | |
457 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Resend]; | 460 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Resend]; |
458 | bucket.RequestedDripRate = resend; | 461 | bucket.RequestedDripRate = resend; |
459 | bucket.RequestedBurst = m_burst; | 462 | bucket.RequestedBurst = m_burst; |
@@ -481,6 +484,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
481 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; | 484 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; |
482 | bucket.RequestedDripRate = texture; | 485 | bucket.RequestedDripRate = texture; |
483 | bucket.RequestedBurst = m_burst; | 486 | bucket.RequestedBurst = m_burst; |
487 | */ | ||
488 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Resend]; | ||
489 | bucket.RequestedDripRate = resend; | ||
490 | bucket.RequestedBurst = resend * m_burstTime; | ||
491 | |||
492 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Land]; | ||
493 | bucket.RequestedDripRate = land; | ||
494 | bucket.RequestedBurst = land * m_burstTime; | ||
495 | |||
496 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Wind]; | ||
497 | bucket.RequestedDripRate = wind; | ||
498 | bucket.RequestedBurst = wind * m_burstTime; | ||
499 | |||
500 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Cloud]; | ||
501 | bucket.RequestedDripRate = cloud; | ||
502 | bucket.RequestedBurst = cloud * m_burstTime; | ||
503 | |||
504 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Asset]; | ||
505 | bucket.RequestedDripRate = asset; | ||
506 | bucket.RequestedBurst = asset * m_burstTime; | ||
507 | |||
508 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Task]; | ||
509 | bucket.RequestedDripRate = task; | ||
510 | bucket.RequestedBurst = task * m_burstTime; | ||
511 | |||
512 | bucket = m_throttleCategories[(int)ThrottleOutPacketType.Texture]; | ||
513 | bucket.RequestedDripRate = texture; | ||
514 | bucket.RequestedBurst = texture * m_burstTime; | ||
484 | 515 | ||
485 | // Reset the packed throttles cached data | 516 | // Reset the packed throttles cached data |
486 | m_packedThrottles = null; | 517 | m_packedThrottles = null; |