diff options
author | John Hurliman | 2009-10-30 00:43:46 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-30 00:43:46 -0700 |
commit | 7965b6eb611be5f1a3cc75b2f8e3f3b76c87ffa0 (patch) | |
tree | 08f8fb6a0086de02f7014f32e18a4239b2332aff /OpenSim/Region/ClientStack | |
parent | * Fixes issue #4329 "llDialog fails silently" by updating OpenMetaverse.dll (diff) | |
download | opensim-SC-7965b6eb611be5f1a3cc75b2f8e3f3b76c87ffa0.zip opensim-SC-7965b6eb611be5f1a3cc75b2f8e3f3b76c87ffa0.tar.gz opensim-SC-7965b6eb611be5f1a3cc75b2f8e3f3b76c87ffa0.tar.bz2 opensim-SC-7965b6eb611be5f1a3cc75b2f8e3f3b76c87ffa0.tar.xz |
* Moving parcel media and avatar update packets from the unthrottled category to task
* Fixing a bug where the max burst rate for the state category was being set as unlimited, causing connections to child agents to saturate bandwidth
* Upped the example default drip rates to 1000 bytes/sec, the minimum granularity for the token buckets
Diffstat (limited to 'OpenSim/Region/ClientStack')
4 files changed, 25 insertions, 22 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 992d06f..b8c99cf 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1856,7 +1856,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1856 | economyData.Info.TeleportMinPrice = TeleportMinPrice; | 1856 | economyData.Info.TeleportMinPrice = TeleportMinPrice; |
1857 | economyData.Info.TeleportPriceExponent = TeleportPriceExponent; | 1857 | economyData.Info.TeleportPriceExponent = TeleportPriceExponent; |
1858 | economyData.Header.Reliable = true; | 1858 | economyData.Header.Reliable = true; |
1859 | OutPacket(economyData, ThrottleOutPacketType.Unknown); | 1859 | OutPacket(economyData, ThrottleOutPacketType.Task); |
1860 | } | 1860 | } |
1861 | 1861 | ||
1862 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) | 1862 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) |
@@ -3234,7 +3234,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3234 | terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue(); | 3234 | terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue(); |
3235 | } | 3235 | } |
3236 | 3236 | ||
3237 | OutPacket(terse, ThrottleOutPacketType.Unknown); // HACK: Unthrottled for testing | 3237 | // HACK: Using the task category until the tiered reprioritization code is in |
3238 | OutPacket(terse, ThrottleOutPacketType.Task); | ||
3238 | } | 3239 | } |
3239 | 3240 | ||
3240 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 3241 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
@@ -4951,6 +4952,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4951 | /// <param name="throttlePacketType">Throttling category for the packet</param> | 4952 | /// <param name="throttlePacketType">Throttling category for the packet</param> |
4952 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType) | 4953 | protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType) |
4953 | { | 4954 | { |
4955 | if (ChildAgentStatus()) | ||
4956 | Thread.Sleep(200); | ||
4954 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); | 4957 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true); |
4955 | } | 4958 | } |
4956 | 4959 | ||
@@ -9843,7 +9846,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9843 | commandMessagePacket.CommandBlock.Command = (uint)command; | 9846 | commandMessagePacket.CommandBlock.Command = (uint)command; |
9844 | commandMessagePacket.CommandBlock.Time = time; | 9847 | commandMessagePacket.CommandBlock.Time = time; |
9845 | 9848 | ||
9846 | OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown); | 9849 | OutPacket(commandMessagePacket, ThrottleOutPacketType.Task); |
9847 | } | 9850 | } |
9848 | 9851 | ||
9849 | public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, | 9852 | public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, |
@@ -9861,7 +9864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9861 | updatePacket.DataBlockExtended.MediaHeight = mediaHeight; | 9864 | updatePacket.DataBlockExtended.MediaHeight = mediaHeight; |
9862 | updatePacket.DataBlockExtended.MediaLoop = mediaLoop; | 9865 | updatePacket.DataBlockExtended.MediaLoop = mediaLoop; |
9863 | 9866 | ||
9864 | OutPacket(updatePacket, ThrottleOutPacketType.Unknown); | 9867 | OutPacket(updatePacket, ThrottleOutPacketType.Task); |
9865 | } | 9868 | } |
9866 | 9869 | ||
9867 | #endregion | 9870 | #endregion |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs index 84a4959..6619dcb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs | |||
@@ -135,8 +135,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
135 | private readonly TokenBucket m_throttle; | 135 | private readonly TokenBucket m_throttle; |
136 | /// <summary>Throttle buckets for each packet category</summary> | 136 | /// <summary>Throttle buckets for each packet category</summary> |
137 | private readonly TokenBucket[] m_throttleCategories; | 137 | private readonly TokenBucket[] m_throttleCategories; |
138 | /// <summary>Throttle rate defaults and limits</summary> | ||
139 | private readonly ThrottleRates m_defaultThrottleRates; | ||
140 | /// <summary>Outgoing queues for throttled packets</summary> | 138 | /// <summary>Outgoing queues for throttled packets</summary> |
141 | private readonly OpenSim.Framework.LocklessQueue<OutgoingPacket>[] m_packetOutboxes = new OpenSim.Framework.LocklessQueue<OutgoingPacket>[THROTTLE_CATEGORY_COUNT]; | 139 | private readonly OpenSim.Framework.LocklessQueue<OutgoingPacket>[] m_packetOutboxes = new OpenSim.Framework.LocklessQueue<OutgoingPacket>[THROTTLE_CATEGORY_COUNT]; |
142 | /// <summary>A container that can hold one packet for each outbox, used to store | 140 | /// <summary>A container that can hold one packet for each outbox, used to store |
@@ -161,7 +159,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
161 | RemoteEndPoint = remoteEndPoint; | 159 | RemoteEndPoint = remoteEndPoint; |
162 | CircuitCode = circuitCode; | 160 | CircuitCode = circuitCode; |
163 | m_udpServer = server; | 161 | m_udpServer = server; |
164 | m_defaultThrottleRates = rates; | ||
165 | // Create a token bucket throttle for this client that has the scene token bucket as a parent | 162 | // Create a token bucket throttle for this client that has the scene token bucket as a parent |
166 | m_throttle = new TokenBucket(parentThrottle, rates.TotalLimit, rates.Total); | 163 | m_throttle = new TokenBucket(parentThrottle, rates.TotalLimit, rates.Total); |
167 | // Create an array of token buckets for this clients different throttle categories | 164 | // Create an array of token buckets for this clients different throttle categories |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 9792bcd..cc06a85 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -409,6 +409,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
409 | SendPacket(udpClient, pc, ThrottleOutPacketType.Unknown, false); | 409 | SendPacket(udpClient, pc, ThrottleOutPacketType.Unknown, false); |
410 | } | 410 | } |
411 | 411 | ||
412 | public void CompletePing(LLUDPClient udpClient, byte pingID) | ||
413 | { | ||
414 | CompletePingCheckPacket completePing = new CompletePingCheckPacket(); | ||
415 | completePing.PingID.PingID = pingID; | ||
416 | SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false); | ||
417 | } | ||
418 | |||
412 | public void ResendUnacked(LLUDPClient udpClient) | 419 | public void ResendUnacked(LLUDPClient udpClient) |
413 | { | 420 | { |
414 | if (!udpClient.IsConnected) | 421 | if (!udpClient.IsConnected) |
@@ -669,10 +676,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
669 | { | 676 | { |
670 | // We don't need to do anything else with ping checks | 677 | // We don't need to do anything else with ping checks |
671 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; | 678 | StartPingCheckPacket startPing = (StartPingCheckPacket)packet; |
672 | 679 | CompletePing(udpClient, startPing.PingID.PingID); | |
673 | CompletePingCheckPacket completePing = new CompletePingCheckPacket(); | ||
674 | completePing.PingID.PingID = startPing.PingID.PingID; | ||
675 | SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false); | ||
676 | return; | 680 | return; |
677 | } | 681 | } |
678 | else if (packet.Type == PacketType.CompletePingCheck) | 682 | else if (packet.Type == PacketType.CompletePingCheck) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs index 008d827..aaf6e26 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs | |||
@@ -87,15 +87,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
87 | IConfig throttleConfig = config.Configs["ClientStack.LindenUDP"]; | 87 | IConfig throttleConfig = config.Configs["ClientStack.LindenUDP"]; |
88 | 88 | ||
89 | Resend = throttleConfig.GetInt("resend_default", 12500); | 89 | Resend = throttleConfig.GetInt("resend_default", 12500); |
90 | Land = throttleConfig.GetInt("land_default", 500); | 90 | Land = throttleConfig.GetInt("land_default", 1000); |
91 | Wind = throttleConfig.GetInt("wind_default", 500); | 91 | Wind = throttleConfig.GetInt("wind_default", 1000); |
92 | Cloud = throttleConfig.GetInt("cloud_default", 500); | 92 | Cloud = throttleConfig.GetInt("cloud_default", 1000); |
93 | Task = throttleConfig.GetInt("task_default", 500); | 93 | Task = throttleConfig.GetInt("task_default", 1000); |
94 | Texture = throttleConfig.GetInt("texture_default", 500); | 94 | Texture = throttleConfig.GetInt("texture_default", 1000); |
95 | Asset = throttleConfig.GetInt("asset_default", 500); | 95 | Asset = throttleConfig.GetInt("asset_default", 1000); |
96 | State = throttleConfig.GetInt("state_default", 500); | 96 | State = throttleConfig.GetInt("state_default", 1000); |
97 | |||
98 | Total = throttleConfig.GetInt("client_throttle_max_bps", 0); | ||
99 | 97 | ||
100 | ResendLimit = throttleConfig.GetInt("resend_limit", 18750); | 98 | ResendLimit = throttleConfig.GetInt("resend_limit", 18750); |
101 | LandLimit = throttleConfig.GetInt("land_limit", 29750); | 99 | LandLimit = throttleConfig.GetInt("land_limit", 29750); |
@@ -104,9 +102,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
104 | TaskLimit = throttleConfig.GetInt("task_limit", 18750); | 102 | TaskLimit = throttleConfig.GetInt("task_limit", 18750); |
105 | TextureLimit = throttleConfig.GetInt("texture_limit", 55750); | 103 | TextureLimit = throttleConfig.GetInt("texture_limit", 55750); |
106 | AssetLimit = throttleConfig.GetInt("asset_limit", 27500); | 104 | AssetLimit = throttleConfig.GetInt("asset_limit", 27500); |
107 | State = throttleConfig.GetInt("state_limit", 37000); | 105 | StateLimit = throttleConfig.GetInt("state_limit", 37000); |
108 | 106 | ||
109 | TotalLimit = throttleConfig.GetInt("client_throttle_max_bps", 0); | 107 | Total = throttleConfig.GetInt("client_throttle_max_bps", 0); |
108 | TotalLimit = Total; | ||
110 | } | 109 | } |
111 | catch (Exception) { } | 110 | catch (Exception) { } |
112 | } | 111 | } |