diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientStackUserSettings.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | 2 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 10 |
5 files changed, 43 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/ClientStackUserSettings.cs b/OpenSim/Region/ClientStack/ClientStackUserSettings.cs index 55ccdca..31293d3 100644 --- a/OpenSim/Region/ClientStack/ClientStackUserSettings.cs +++ b/OpenSim/Region/ClientStack/ClientStackUserSettings.cs | |||
@@ -44,6 +44,6 @@ namespace OpenSim.Region.ClientStack | |||
44 | /// A multiplier applied to all client throttle settings. This is hopefully a temporary setting to iron out | 44 | /// A multiplier applied to all client throttle settings. This is hopefully a temporary setting to iron out |
45 | /// bugs that appear if the existing incorrect * 8 throttle (bytes instead of bits) is corrected. | 45 | /// bugs that appear if the existing incorrect * 8 throttle (bytes instead of bits) is corrected. |
46 | /// </summary> | 46 | /// </summary> |
47 | public int ClientThrottleMultipler; | 47 | public float ClientThrottleMultipler; |
48 | } | 48 | } |
49 | } | 49 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index 9abde5d..317d852 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs | |||
@@ -110,13 +110,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
110 | AssetOutgoingPacketQueue = new Queue<LLQueItem>(); | 110 | AssetOutgoingPacketQueue = new Queue<LLQueItem>(); |
111 | 111 | ||
112 | // Set up the throttle classes (min, max, current) in bits per second | 112 | // Set up the throttle classes (min, max, current) in bits per second |
113 | ResendThrottle = new LLPacketThrottle(5000, 100000, 16000); | 113 | ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler); |
114 | LandThrottle = new LLPacketThrottle(1000, 100000, 2000); | 114 | LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler); |
115 | WindThrottle = new LLPacketThrottle(0, 100000, 0); | 115 | WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); |
116 | CloudThrottle = new LLPacketThrottle(0, 100000, 0); | 116 | CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); |
117 | TaskThrottle = new LLPacketThrottle(1000, 800000, 3000); | 117 | TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler); |
118 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000); | 118 | AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler); |
119 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000); | 119 | TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler); |
120 | 120 | ||
121 | // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. | 121 | // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. |
122 | ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; | 122 | ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; |
@@ -127,7 +127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
127 | 127 | ||
128 | TotalThrottle | 128 | TotalThrottle |
129 | = new LLPacketThrottle( | 129 | = new LLPacketThrottle( |
130 | totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current); | 130 | totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, userSettings.ClientThrottleMultipler); |
131 | 131 | ||
132 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); | 132 | throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); |
133 | throttleTimer.Elapsed += new ElapsedEventHandler(ThrottleTimerElapsed); | 133 | throttleTimer.Elapsed += new ElapsedEventHandler(ThrottleTimerElapsed); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs index 98b613e..2c67d63 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketThrottle.cs | |||
@@ -34,12 +34,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
34 | private int m_currentThrottle; | 34 | private int m_currentThrottle; |
35 | private const int m_throttleTimeDivisor = 7; | 35 | private const int m_throttleTimeDivisor = 7; |
36 | private int m_currentBitsSent; | 36 | private int m_currentBitsSent; |
37 | |||
38 | /// <value> | ||
39 | /// Temporary field | ||
40 | /// </value> | ||
41 | private float m_throttleMultiplier; | ||
37 | 42 | ||
38 | public LLPacketThrottle(int Min, int Max, int Throttle) | 43 | /// <summary> |
44 | /// Constructor. | ||
45 | /// </summary> | ||
46 | /// <param name="min"></param> | ||
47 | /// <param name="max"></param> | ||
48 | /// <param name="throttle"></param> | ||
49 | /// <param name="throttleMultiplier"> | ||
50 | /// A temporary parameter that's ends up multiplying all throttle settings. This only exists as a path to | ||
51 | /// using real throttle values instead of the *8 multipler that we had been using (bytes instead of btis) | ||
52 | /// </param> | ||
53 | public LLPacketThrottle(int min, int max, int throttle, float throttleMultiplier) | ||
39 | { | 54 | { |
40 | m_maxAllowableThrottle = Max; | 55 | m_throttleMultiplier = throttleMultiplier; |
41 | m_minAllowableThrottle = Min; | 56 | m_maxAllowableThrottle = (int)(max * throttleMultiplier); |
42 | m_currentThrottle = Throttle; | 57 | m_minAllowableThrottle = (int)(Min * throttleMultiplier); |
58 | m_currentThrottle = (int)(Throttle * throttleMultiplier); | ||
43 | m_currentBitsSent = 0; | 59 | m_currentBitsSent = 0; |
44 | } | 60 | } |
45 | 61 | ||
@@ -61,9 +77,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
61 | 77 | ||
62 | public int AddBytes(int bytes) | 78 | public int AddBytes(int bytes) |
63 | { | 79 | { |
64 | // XXX: Temporarily treat bytes as bits. This is a temporary revert of r6714 until other underlying issues | 80 | m_currentBitsSent += bytes * 8; |
65 | // are addressed. | ||
66 | m_currentBitsSent += bytes; | ||
67 | return m_currentBitsSent; | 81 | return m_currentBitsSent; |
68 | } | 82 | } |
69 | 83 | ||
@@ -83,17 +97,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
83 | get { return m_currentThrottle; } | 97 | get { return m_currentThrottle; } |
84 | set | 98 | set |
85 | { | 99 | { |
86 | if (value > m_maxAllowableThrottle) | 100 | int multipliedValue = (int)(value * m_throttleMultiplier); |
101 | |||
102 | if (multipliedValue > m_maxAllowableThrottle) | ||
87 | { | 103 | { |
88 | m_currentThrottle = m_maxAllowableThrottle; | 104 | m_currentThrottle = m_maxAllowableThrottle; |
89 | } | 105 | } |
90 | else if (value < m_minAllowableThrottle) | 106 | else if (multipliedValue < m_minAllowableThrottle) |
91 | { | 107 | { |
92 | m_currentThrottle = m_minAllowableThrottle; | 108 | m_currentThrottle = m_minAllowableThrottle; |
93 | } | 109 | } |
94 | else | 110 | else |
95 | { | 111 | { |
96 | m_currentThrottle = value; | 112 | m_currentThrottle = multipliedValue; |
97 | } | 113 | } |
98 | } | 114 | } |
99 | } | 115 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 72072c2..1779d54 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
155 | 155 | ||
156 | if (config != null) | 156 | if (config != null) |
157 | { | 157 | { |
158 | userSettings.ClientThrottleMultipler = config.GetInt("client_throttle_multiplier"); | 158 | userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); |
159 | } | 159 | } |
160 | 160 | ||
161 | //m_log.DebugFormat("[CLIENT]: client_throttle_multiplier = {0}", userSettings.ClientThrottleMultipler); | 161 | //m_log.DebugFormat("[CLIENT]: client_throttle_multiplier = {0}", userSettings.ClientThrottleMultipler); |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 439efbc..c8d1d5d 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -174,8 +174,6 @@ dump_assets_to_file = false | |||
174 | [Network] | 174 | [Network] |
175 | http_listener_port = 9000 | 175 | http_listener_port = 9000 |
176 | remoting_listener_port = 8895 | 176 | remoting_listener_port = 8895 |
177 | |||
178 | |||
179 | default_location_x = 1000 | 177 | default_location_x = 1000 |
180 | default_location_y = 1000 | 178 | default_location_y = 1000 |
181 | 179 | ||
@@ -187,7 +185,6 @@ http_listener_cn = "localhost" ; Use the cert with the common name | |||
187 | http_listener_sslport = 9001 ; Use this port for SSL connections | 185 | http_listener_sslport = 9001 ; Use this port for SSL connections |
188 | http_listener_ssl_cert = "" ; Currently unused, but will be used for OSHttpServer | 186 | http_listener_ssl_cert = "" ; Currently unused, but will be used for OSHttpServer |
189 | 187 | ||
190 | |||
191 | ; Uncomment below to enable llRemoteData/remote channels | 188 | ; Uncomment below to enable llRemoteData/remote channels |
192 | ; remoteDataPort = 20800 | 189 | ; remoteDataPort = 20800 |
193 | 190 | ||
@@ -207,6 +204,13 @@ inventory_server_url = "http://127.0.0.1:8004" | |||
207 | ; user_send_key and user_recv_key, too | 204 | ; user_send_key and user_recv_key, too |
208 | messaging_server_url = "http://127.0.0.1:8006" | 205 | messaging_server_url = "http://127.0.0.1:8006" |
209 | 206 | ||
207 | [ClientStack.LindenUDP] | ||
208 | ; Adjust the multiplier applied to all client throttles | ||
209 | ; This setting only exists because we're probably over throttling by a factor of 8. Setting this to | ||
210 | ; 1 uses the real throttle values, but this may be revealing other bugs, so is currently included as test setting | ||
211 | ; You probably don't want to change this. | ||
212 | client_throttle_multiplier = 8; | ||
213 | |||
210 | [Chat] | 214 | [Chat] |
211 | whisper_distance = 10 | 215 | whisper_distance = 10 |
212 | say_distance = 30 | 216 | say_distance = 30 |