Fix an issue where specifying both max client and server outgoing UDP throttles would cause client throttles to be lower than expected when total requests exceeded the scene limit.

This was because specifying a max client throttle would always request the max from the parent server throttle, no matter the actual total requests on the client throttle.
This would lead to a lower server multiplier than expected.
This change also adds a 'target' column to the "show throttles" output that shows the target rate (as set by client) if adaptive throttles is active.
This commit also re-adds the functionality lost in recent 5c1a1458 to set a max client throttle when adaptive is active.
This commit also adds TestClientThrottlePerClientAndRegionLimited and TestClientThrottleAdaptiveNoLimit regression tests
This commit is contained in:
Justin Clark-Casey (justincc)
2014-10-10 23:36:50 +01:00
parent ead32de790
commit d33964222a
8 changed files with 296 additions and 82 deletions

View File

@@ -182,7 +182,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ConsoleDisplayList cdl = new ConsoleDisplayList();
cdl.AddRow("Adaptive throttles", m_udpServer.ThrottleRates.AdaptiveThrottlesEnabled);
long maxSceneDripRate = m_udpServer.MaxTotalDripRate;
long maxSceneDripRate = m_udpServer.Throttle.MaxDripRate;
cdl.AddRow(
"Max scene throttle",
maxSceneDripRate != 0 ? string.Format("{0} kbps", maxSceneDripRate * 8 / 1000) : "unset");
@@ -360,7 +360,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
param, newValue, sp.Name, sp.IsChildAgent ? "child" : "root", m_udpServer.Scene.Name);
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
udpClient.FlowThrottle.Enabled = newValue;
udpClient.FlowThrottle.AdaptiveEnabled = newValue;
// udpClient.FlowThrottle.MaxDripRate = 0;
// udpClient.FlowThrottle.AdjustedDripRate = 0;
}
@@ -426,7 +426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LLUDPClient udpClient = ((LLClientView)sp.ControllingClient).UDPClient;
ConsoleDisplayList cdl = new ConsoleDisplayList();
cdl.AddRow("Adaptive throttle", udpClient.FlowThrottle.Enabled);
cdl.AddRow("Adaptive throttle", udpClient.FlowThrottle.AdaptiveEnabled);
cdl.AddRow("Max throttle", string.Format("{0} kbps", udpClient.FlowThrottle.RequestedDripRate * 8 / 1000));
m_console.Output(cdl.ToString());