From bda8f2a2c1d702adc9e61869195a4dbcd3c6751f Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 29 Dec 2014 23:19:10 -0800 Subject: 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. --- OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs index 9d6c09e..adf019f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs @@ -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); -- cgit v1.1 From 58229a968b5659697a703e9234f216ff7dadfeac Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 30 Dec 2014 10:50:34 -0800 Subject: Turn on logging of old acks, this is for debugging only, stats version coming later --- .../ClientStack/Linden/UDP/UnackedPacketCollection.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs index adf019f..3599a16 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs @@ -31,6 +31,9 @@ using System.Net; using System.Threading; using OpenMetaverse; +using System.Reflection; +using log4net; + namespace OpenSim.Region.ClientStack.LindenUDP { /// @@ -60,6 +63,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// Holds the actual unacked packet data, sorted by sequence number private Dictionary m_packets = new Dictionary(); /// Holds packets that need to be added to the unacknowledged list @@ -207,9 +212,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - //m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", pendingAcknowledgement.SequenceNumber); + m_log.WarnFormat("[UNACKED PACKET COLLECTION]: found null packet for sequence number {0} to ack", + pendingAcknowledgement.SequenceNumber); } } + else + { + m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", + pendingAcknowledgement.SequenceNumber); + } } uint pendingRemove; -- cgit v1.1 From 5bb73793c73bfb40d90c99c0fd1f2f21425a2c0f Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 30 Dec 2014 14:43:42 -0800 Subject: Comment out the debugging statements added in the last commit. Keeping them in the code for later use rather than just reverting them. Fixed the throttle tests for the new algorithm used when packets are marked as expired. --- .../ClientStack/Linden/UDP/UnackedPacketCollection.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs index 3599a16..b546a99 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs @@ -31,8 +31,8 @@ using System.Net; using System.Threading; using OpenMetaverse; -using System.Reflection; -using log4net; +//using System.Reflection; +//using log4net; namespace OpenSim.Region.ClientStack.LindenUDP { @@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// Holds the actual unacked packet data, sorted by sequence number private Dictionary m_packets = new Dictionary(); @@ -169,8 +169,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - //if (expiredPackets != null) - // m_log.DebugFormat("[UNACKED PACKET COLLECTION]: Found {0} expired packets on timeout of {1}", expiredPackets.Count, timeoutMS); + // if (expiredPackets != null) + // m_log.DebugFormat("[UNACKED PACKET COLLECTION]: Found {0} expired packets on timeout of {1}", expiredPackets.Count, timeoutMS); return expiredPackets; } @@ -212,14 +212,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - m_log.WarnFormat("[UNACKED PACKET COLLECTION]: found null packet for sequence number {0} to ack", - pendingAcknowledgement.SequenceNumber); + // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: found null packet for sequence number {0} to ack", + // pendingAcknowledgement.SequenceNumber); } } else { - m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", - pendingAcknowledgement.SequenceNumber); + // m_log.WarnFormat("[UNACKED PACKET COLLECTION]: Could not find packet with sequence number {0} to ack", + // pendingAcknowledgement.SequenceNumber); } } -- cgit v1.1