* Expose a client_throttle_multiplier setting in OpenSim.ini. This multiplier is applied to all the client throttle settings received by the client

* This should probably be 1, but currently by default it is 8, to reflect what was being eon3 in OpenSim before this revision.  So if the client requested a maximum throttle 
of 1500 kilobits per second, we would actually send out 1500 kilobytes per second
* Adjusting this multiplier down towards 1 may improve your OpenSim experience, though in other situations it may degrade (e.g. if you're using a standalone over high bandwidth 
links)
* This is currently a user setting because adjusting it down may currently reveal other OpenSim bugs.
0.6.0-stable
Justin Clarke Casey 2008-11-03 21:09:30 +00:00
parent c789a9d02a
commit 4ff0c39153
5 changed files with 43 additions and 23 deletions

View File

@ -44,6 +44,6 @@ namespace OpenSim.Region.ClientStack
/// A multiplier applied to all client throttle settings. This is hopefully a temporary setting to iron out
/// bugs that appear if the existing incorrect * 8 throttle (bytes instead of bits) is corrected.
/// </summary>
public int ClientThrottleMultipler;
public float ClientThrottleMultipler;
}
}

View File

@ -110,13 +110,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AssetOutgoingPacketQueue = new Queue<LLQueItem>();
// Set up the throttle classes (min, max, current) in bits per second
ResendThrottle = new LLPacketThrottle(5000, 100000, 16000);
LandThrottle = new LLPacketThrottle(1000, 100000, 2000);
WindThrottle = new LLPacketThrottle(0, 100000, 0);
CloudThrottle = new LLPacketThrottle(0, 100000, 0);
TaskThrottle = new LLPacketThrottle(1000, 800000, 3000);
AssetThrottle = new LLPacketThrottle(1000, 800000, 1000);
TextureThrottle = new LLPacketThrottle(1000, 800000, 4000);
ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler);
LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler);
WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler);
TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler);
AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler);
TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler);
// Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second.
ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings;
@ -127,7 +127,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
TotalThrottle
= new LLPacketThrottle(
totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current);
totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, userSettings.ClientThrottleMultipler);
throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor));
throttleTimer.Elapsed += new ElapsedEventHandler(ThrottleTimerElapsed);

View File

@ -35,11 +35,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private const int m_throttleTimeDivisor = 7;
private int m_currentBitsSent;
public LLPacketThrottle(int Min, int Max, int Throttle)
/// <value>
/// Temporary field
/// </value>
private float m_throttleMultiplier;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="min"></param>
/// <param name="max"></param>
/// <param name="throttle"></param>
/// <param name="throttleMultiplier">
/// A temporary parameter that's ends up multiplying all throttle settings. This only exists as a path to
/// using real throttle values instead of the *8 multipler that we had been using (bytes instead of btis)
/// </param>
public LLPacketThrottle(int min, int max, int throttle, float throttleMultiplier)
{
m_maxAllowableThrottle = Max;
m_minAllowableThrottle = Min;
m_currentThrottle = Throttle;
m_throttleMultiplier = throttleMultiplier;
m_maxAllowableThrottle = (int)(max * throttleMultiplier);
m_minAllowableThrottle = (int)(Min * throttleMultiplier);
m_currentThrottle = (int)(Throttle * throttleMultiplier);
m_currentBitsSent = 0;
}
@ -61,9 +77,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int AddBytes(int bytes)
{
// XXX: Temporarily treat bytes as bits. This is a temporary revert of r6714 until other underlying issues
// are addressed.
m_currentBitsSent += bytes;
m_currentBitsSent += bytes * 8;
return m_currentBitsSent;
}
@ -83,17 +97,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
get { return m_currentThrottle; }
set
{
if (value > m_maxAllowableThrottle)
int multipliedValue = (int)(value * m_throttleMultiplier);
if (multipliedValue > m_maxAllowableThrottle)
{
m_currentThrottle = m_maxAllowableThrottle;
}
else if (value < m_minAllowableThrottle)
else if (multipliedValue < m_minAllowableThrottle)
{
m_currentThrottle = m_minAllowableThrottle;
}
else
{
m_currentThrottle = value;
m_currentThrottle = multipliedValue;
}
}
}

View File

@ -155,7 +155,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (config != null)
{
userSettings.ClientThrottleMultipler = config.GetInt("client_throttle_multiplier");
userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier");
}
//m_log.DebugFormat("[CLIENT]: client_throttle_multiplier = {0}", userSettings.ClientThrottleMultipler);

View File

@ -174,8 +174,6 @@ dump_assets_to_file = false
[Network]
http_listener_port = 9000
remoting_listener_port = 8895
default_location_x = 1000
default_location_y = 1000
@ -187,7 +185,6 @@ http_listener_cn = "localhost" ; Use the cert with the common name
http_listener_sslport = 9001 ; Use this port for SSL connections
http_listener_ssl_cert = "" ; Currently unused, but will be used for OSHttpServer
; Uncomment below to enable llRemoteData/remote channels
; remoteDataPort = 20800
@ -207,6 +204,13 @@ inventory_server_url = "http://127.0.0.1:8004"
; user_send_key and user_recv_key, too
messaging_server_url = "http://127.0.0.1:8006"
[ClientStack.LindenUDP]
; Adjust the multiplier applied to all client throttles
; This setting only exists because we're probably over throttling by a factor of 8. Setting this to
; 1 uses the real throttle values, but this may be revealing other bugs, so is currently included as test setting
; You probably don't want to change this.
client_throttle_multiplier = 8;
[Chat]
whisper_distance = 10
say_distance = 30