Change the effect of successfully acknowledged packets to bump the
adaptive throttle by a full MTU. This is consistent with some implementations of congestion control algorithms and certainly has the effect of opening the throttle window more quickly after errors. This is especially important after initial scene load when the number and size of packets is small.mb-throttle-test
parent
041a09ecb9
commit
bda8f2a2c1
|
@ -141,7 +141,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
|||
|
||||
udpServer.Throttle.DebugLevel = 1;
|
||||
udpClient.ThrottleDebugLevel = 1;
|
||||
|
||||
|
||||
int resendBytes = 1000;
|
||||
int landBytes = 2000;
|
||||
int windBytes = 3000;
|
||||
|
@ -208,7 +208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
|||
textureBytes * commitRatio, assetBytes * commitRatio, udpClient.FlowThrottle.AdjustedDripRate, totalBytes, 0);
|
||||
|
||||
// Test an increase in target throttle
|
||||
udpClient.FlowThrottle.AcknowledgePackets(35000);
|
||||
udpClient.FlowThrottle.AcknowledgePackets(25);
|
||||
commitRatio = 0.2;
|
||||
|
||||
AssertThrottles(
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
protected const Int32 m_minimumDripRate = 1400;
|
||||
protected const Int32 m_minimumDripRate = LLUDPServer.MTU;
|
||||
|
||||
/// <summary>Time of the last drip, in system ticks</summary>
|
||||
protected Int32 m_lastDrip;
|
||||
|
@ -447,12 +447,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
/// <summary>
|
||||
/// Reliable packets acked by the client adjust the drip rate up.
|
||||
/// <param name="bytes">Number of bytes acknowledged</param>
|
||||
/// <param name="packets">Number of packets successfully acknowledged</param>
|
||||
/// </summary>
|
||||
public void AcknowledgePackets(Int32 bytes)
|
||||
public void AcknowledgePackets(Int32 packets)
|
||||
{
|
||||
if (AdaptiveEnabled)
|
||||
AdjustedDripRate = AdjustedDripRate + bytes;
|
||||
AdjustedDripRate = AdjustedDripRate + packets * LLUDPServer.MTU;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -192,7 +192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
// As with other network applications, assume that an acknowledged packet is an
|
||||
// indication that the network can handle a little more load, speed up the transmission
|
||||
ackedPacket.Client.FlowThrottle.AcknowledgePackets(ackedPacket.Buffer.DataLength);
|
||||
ackedPacket.Client.FlowThrottle.AcknowledgePackets(1);
|
||||
|
||||
// Update stats
|
||||
Interlocked.Add(ref ackedPacket.Client.UnackedBytes, -ackedPacket.Buffer.DataLength);
|
||||
|
|
Loading…
Reference in New Issue