diff options
author | Diva Canto | 2010-12-13 11:45:17 -0800 |
---|---|---|
committer | Diva Canto | 2010-12-13 11:45:17 -0800 |
commit | 6b8d01d8c4b4c4f05e0bc51724984dab22e4ee51 (patch) | |
tree | 64847caf1cdd0350d03394dfbf99b9958b861122 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-6b8d01d8c4b4c4f05e0bc51724984dab22e4ee51.zip opensim-SC_OLD-6b8d01d8c4b4c4f05e0bc51724984dab22e4ee51.tar.gz opensim-SC_OLD-6b8d01d8c4b4c4f05e0bc51724984dab22e4ee51.tar.bz2 opensim-SC_OLD-6b8d01d8c4b4c4f05e0bc51724984dab22e4ee51.tar.xz |
It turns out that the 1/2 sec burst for prims download is not a bug, but a feature of the client. The client sets the throttles in such a way that makes the server behave like that. The same happens in the Linden Grid.
Revert "This may have been the biggest, baddest bug in OpenSim ever... confusion between bytes per second and bytes per millisecond."
This reverts commit 870bbcfc6c264c515ac660837d16ccad4e59ac64.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs index 4d9ca09..bdbd284 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs | |||
@@ -119,10 +119,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
119 | 119 | ||
120 | #endregion Properties | 120 | #endregion Properties |
121 | 121 | ||
122 | // To help debugging | ||
123 | private static int idCount = 0; | ||
124 | private int id; | ||
125 | |||
126 | /// <summary> | 122 | /// <summary> |
127 | /// Default constructor | 123 | /// Default constructor |
128 | /// </summary> | 124 | /// </summary> |
@@ -138,7 +134,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
138 | MaxBurst = maxBurst; | 134 | MaxBurst = maxBurst; |
139 | DripRate = dripRate; | 135 | DripRate = dripRate; |
140 | lastDrip = Environment.TickCount & Int32.MaxValue; | 136 | lastDrip = Environment.TickCount & Int32.MaxValue; |
141 | id = idCount++; | ||
142 | } | 137 | } |
143 | 138 | ||
144 | /// <summary> | 139 | /// <summary> |
@@ -196,7 +191,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
196 | if (tokensPerMS == 0) | 191 | if (tokensPerMS == 0) |
197 | { | 192 | { |
198 | content = maxBurst; | 193 | content = maxBurst; |
199 | //Console.WriteLine("XXX (" + id + ") content = maxBurst and maxBurst = " + maxBurst); | ||
200 | return true; | 194 | return true; |
201 | } | 195 | } |
202 | else | 196 | else |
@@ -211,14 +205,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
211 | return false; | 205 | return false; |
212 | } | 206 | } |
213 | 207 | ||
214 | // dripAmpount here is in bytes per millisecond | 208 | int dripAmount = deltaMS * tokensPerMS; |
215 | int dripAmount = deltaMS * tokensPerMS; | 209 | |
216 | // but content is in bytes per second, so let's multiply by 1000 | ||
217 | dripAmount = dripAmount * 1000; | ||
218 | content = Math.Min(content + dripAmount, maxBurst); | 210 | content = Math.Min(content + dripAmount, maxBurst); |
219 | lastDrip = now; | 211 | lastDrip = now; |
220 | 212 | ||
221 | //Console.WriteLine("XXX (" + id + ") deltaMS=" + deltaMS + "; tokensPerMS=" + tokensPerMS + "; content=" + content + "; dripAmount=" + dripAmount); | ||
222 | return true; | 213 | return true; |
223 | } | 214 | } |
224 | } | 215 | } |