diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs | 27 |
1 files changed, 21 insertions, 6 deletions
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 | |||
58 | 58 | ||
59 | /// <summary>Flag used to enable adaptive throttles</summary> | 59 | /// <summary>Flag used to enable adaptive throttles</summary> |
60 | public bool AdaptiveThrottlesEnabled; | 60 | public bool AdaptiveThrottlesEnabled; |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// Set the minimum rate that the adaptive throttles can set. The viewer | 63 | /// Set the minimum rate that the adaptive throttles can set. The viewer |
64 | /// can still throttle lower than this, but the adaptive throttles will | 64 | /// can still throttle lower than this, but the adaptive throttles will |
65 | /// never decrease rates below this no matter how many packets are dropped | 65 | /// never decrease rates below this no matter how many packets are dropped |
66 | /// </summary> | 66 | /// </summary> |
67 | public Int64 MinimumAdaptiveThrottleRate; | 67 | public Int64 MinimumAdaptiveThrottleRate; |
68 | 68 | ||
69 | /// <summary>Amount of the texture throttle to steal for the task throttle</summary> | 69 | /// <summary>Amount of the texture throttle to steal for the task throttle</summary> |
70 | public double CannibalizeTextureRate; | 70 | public double CannibalizeTextureRate; |
71 | 71 | ||
72 | public int ClientMaxRate; | ||
73 | public float BrustTime; | ||
74 | |||
72 | /// <summary> | 75 | /// <summary> |
73 | /// Default constructor | 76 | /// Default constructor |
74 | /// </summary> | 77 | /// </summary> |
@@ -88,13 +91,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
88 | Texture = throttleConfig.GetInt("texture_default", 18500); | 91 | Texture = throttleConfig.GetInt("texture_default", 18500); |
89 | Asset = throttleConfig.GetInt("asset_default", 10500); | 92 | Asset = throttleConfig.GetInt("asset_default", 10500); |
90 | 93 | ||
91 | Total = throttleConfig.GetInt("client_throttle_max_bps", 0); | 94 | Total = Resend + Land + Wind + Cloud + Task + Texture + Asset; |
95 | // 5120000 bps default max | ||
96 | ClientMaxRate = throttleConfig.GetInt("client_throttle_max_bps", 640000); | ||
97 | if (ClientMaxRate > 1000000) | ||
98 | ClientMaxRate = 1000000; // no more than 8Mbps | ||
92 | 99 | ||
93 | AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false); | 100 | BrustTime = (float)throttleConfig.GetInt("client_throttle_burtsTimeMS", 10); |
101 | BrustTime *= 1e-3f; | ||
102 | |||
103 | // Adaptive is broken | ||
104 | // AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false); | ||
105 | AdaptiveThrottlesEnabled = false; | ||
94 | MinimumAdaptiveThrottleRate = throttleConfig.GetInt("adaptive_throttle_min_bps", 32000); | 106 | MinimumAdaptiveThrottleRate = throttleConfig.GetInt("adaptive_throttle_min_bps", 32000); |
95 | 107 | ||
96 | CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f); | 108 | // http textures do use udp bandwidth setting |
97 | CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9); | 109 | // CannibalizeTextureRate = (double)throttleConfig.GetFloat("CannibalizeTextureRate", 0.0f); |
110 | // CannibalizeTextureRate = Util.Clamp<double>(CannibalizeTextureRate,0.0, 0.9); | ||
111 | CannibalizeTextureRate = 0f; | ||
112 | |||
98 | } | 113 | } |
99 | catch (Exception) { } | 114 | catch (Exception) { } |
100 | } | 115 | } |