* 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
0.6.8-post-fixes
John Hurliman 2009-10-30 00:43:46 -07:00
parent a05c67bebb
commit 7965b6eb61
5 changed files with 32 additions and 29 deletions

View File

@ -1856,7 +1856,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
economyData.Info.TeleportMinPrice = TeleportMinPrice;
economyData.Info.TeleportPriceExponent = TeleportPriceExponent;
economyData.Header.Reliable = true;
OutPacket(economyData, ThrottleOutPacketType.Unknown);
OutPacket(economyData, ThrottleOutPacketType.Task);
}
public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
@ -3234,7 +3234,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue();
}
OutPacket(terse, ThrottleOutPacketType.Unknown); // HACK: Unthrottled for testing
// HACK: Using the task category until the tiered reprioritization code is in
OutPacket(terse, ThrottleOutPacketType.Task);
}
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
@ -4951,6 +4952,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <param name="throttlePacketType">Throttling category for the packet</param>
protected void OutPacket(Packet packet, ThrottleOutPacketType throttlePacketType)
{
if (ChildAgentStatus())
Thread.Sleep(200);
m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, true);
}
@ -9843,7 +9846,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
commandMessagePacket.CommandBlock.Command = (uint)command;
commandMessagePacket.CommandBlock.Time = time;
OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
OutPacket(commandMessagePacket, ThrottleOutPacketType.Task);
}
public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
@ -9861,7 +9864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
updatePacket.DataBlockExtended.MediaHeight = mediaHeight;
updatePacket.DataBlockExtended.MediaLoop = mediaLoop;
OutPacket(updatePacket, ThrottleOutPacketType.Unknown);
OutPacket(updatePacket, ThrottleOutPacketType.Task);
}
#endregion

View File

@ -135,8 +135,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private readonly TokenBucket m_throttle;
/// <summary>Throttle buckets for each packet category</summary>
private readonly TokenBucket[] m_throttleCategories;
/// <summary>Throttle rate defaults and limits</summary>
private readonly ThrottleRates m_defaultThrottleRates;
/// <summary>Outgoing queues for throttled packets</summary>
private readonly OpenSim.Framework.LocklessQueue<OutgoingPacket>[] m_packetOutboxes = new OpenSim.Framework.LocklessQueue<OutgoingPacket>[THROTTLE_CATEGORY_COUNT];
/// <summary>A container that can hold one packet for each outbox, used to store
@ -161,7 +159,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
RemoteEndPoint = remoteEndPoint;
CircuitCode = circuitCode;
m_udpServer = server;
m_defaultThrottleRates = rates;
// Create a token bucket throttle for this client that has the scene token bucket as a parent
m_throttle = new TokenBucket(parentThrottle, rates.TotalLimit, rates.Total);
// Create an array of token buckets for this clients different throttle categories

View File

@ -409,6 +409,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SendPacket(udpClient, pc, ThrottleOutPacketType.Unknown, false);
}
public void CompletePing(LLUDPClient udpClient, byte pingID)
{
CompletePingCheckPacket completePing = new CompletePingCheckPacket();
completePing.PingID.PingID = pingID;
SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false);
}
public void ResendUnacked(LLUDPClient udpClient)
{
if (!udpClient.IsConnected)
@ -669,10 +676,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// We don't need to do anything else with ping checks
StartPingCheckPacket startPing = (StartPingCheckPacket)packet;
CompletePingCheckPacket completePing = new CompletePingCheckPacket();
completePing.PingID.PingID = startPing.PingID.PingID;
SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false);
CompletePing(udpClient, startPing.PingID.PingID);
return;
}
else if (packet.Type == PacketType.CompletePingCheck)

View File

@ -87,15 +87,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
IConfig throttleConfig = config.Configs["ClientStack.LindenUDP"];
Resend = throttleConfig.GetInt("resend_default", 12500);
Land = throttleConfig.GetInt("land_default", 500);
Wind = throttleConfig.GetInt("wind_default", 500);
Cloud = throttleConfig.GetInt("cloud_default", 500);
Task = throttleConfig.GetInt("task_default", 500);
Texture = throttleConfig.GetInt("texture_default", 500);
Asset = throttleConfig.GetInt("asset_default", 500);
State = throttleConfig.GetInt("state_default", 500);
Total = throttleConfig.GetInt("client_throttle_max_bps", 0);
Land = throttleConfig.GetInt("land_default", 1000);
Wind = throttleConfig.GetInt("wind_default", 1000);
Cloud = throttleConfig.GetInt("cloud_default", 1000);
Task = throttleConfig.GetInt("task_default", 1000);
Texture = throttleConfig.GetInt("texture_default", 1000);
Asset = throttleConfig.GetInt("asset_default", 1000);
State = throttleConfig.GetInt("state_default", 1000);
ResendLimit = throttleConfig.GetInt("resend_limit", 18750);
LandLimit = throttleConfig.GetInt("land_limit", 29750);
@ -104,9 +102,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TaskLimit = throttleConfig.GetInt("task_limit", 18750);
TextureLimit = throttleConfig.GetInt("texture_limit", 55750);
AssetLimit = throttleConfig.GetInt("asset_limit", 27500);
State = throttleConfig.GetInt("state_limit", 37000);
StateLimit = throttleConfig.GetInt("state_limit", 37000);
TotalLimit = throttleConfig.GetInt("client_throttle_max_bps", 0);
Total = throttleConfig.GetInt("client_throttle_max_bps", 0);
TotalLimit = Total;
}
catch (Exception) { }
}

View File

@ -399,13 +399,13 @@
; These are default values that will be overriden by clients
;
;resend_default = 12500
;land_default = 500
;wind_default = 500
;cloud_default = 50
;task_default = 500
;texture_default = 500
;asset_default = 500
;state_default = 500
;land_default = 1000
;wind_default = 1000
;cloud_default = 1000
;task_default = 1000
;texture_default = 1000
;asset_default = 1000
;state_default = 1000
; Per-client maximum burst rates in bytes per second for the various
; throttle categories. These are default values that will be overriden by