From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001
From: onefang
Date: Sun, 19 May 2019 21:24:15 +1000
Subject: Dump OpenSim 0.9.0.1 into it's own branch.
---
.../Region/ClientStack/Linden/UDP/ThrottleRates.cs | 27 +++++++++++++++++-----
1 file changed, 21 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs')
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
index 7a2756b..f8ec97a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs
@@ -58,17 +58,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Flag used to enable adaptive throttles
public bool AdaptiveThrottlesEnabled;
-
+
///
/// Set the minimum rate that the adaptive throttles can set. The viewer
/// can still throttle lower than this, but the adaptive throttles will
/// never decrease rates below this no matter how many packets are dropped
///
public Int64 MinimumAdaptiveThrottleRate;
-
+
/// Amount of the texture throttle to steal for the task throttle
public double CannibalizeTextureRate;
+ public int ClientMaxRate;
+ public float BrustTime;
+
///
/// Default constructor
///
@@ -88,13 +91,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Texture = throttleConfig.GetInt("texture_default", 18500);
Asset = throttleConfig.GetInt("asset_default", 10500);
- Total = throttleConfig.GetInt("client_throttle_max_bps", 0);
+ Total = Resend + Land + Wind + Cloud + Task + Texture + Asset;
+ // 5120000 bps default max
+ ClientMaxRate = throttleConfig.GetInt("client_throttle_max_bps", 640000);
+ if (ClientMaxRate > 1000000)
+ ClientMaxRate = 1000000; // no more than 8Mbps
- AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false);
+ BrustTime = (float)throttleConfig.GetInt("client_throttle_burtsTimeMS", 10);
+ BrustTime *= 1e-3f;
+
+ // Adaptive is broken
+// AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false);
+ AdaptiveThrottlesEnabled = false;
MinimumAdaptiveThrottleRate = throttleConfig.GetInt("adaptive_throttle_min_bps", 32000);
- CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f);
- CannibalizeTextureRate = Util.Clamp(CannibalizeTextureRate,0.0, 0.9);
+ // http textures do use udp bandwidth setting
+// CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f);
+// CannibalizeTextureRate = Util.Clamp(CannibalizeTextureRate,0.0, 0.9);
+ CannibalizeTextureRate = 0f;
+
}
catch (Exception) { }
}
--
cgit v1.1