From 024c12abc3aa42432e55e322141cad1edeb5bad1 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 25 Apr 2011 10:44:41 -0700 Subject: Cleaned up various configuration options. Removed the category throttle limits because the only ones used now are the defaults (which are overwritten by the client throttles anyway). Updated the default rates to correspond to about 350kbps. Also added a configuration to disable adaptive throttle. The default is the previous behavior (no adaptation). --- .../Region/ClientStack/LindenUDP/ThrottleRates.cs | 80 ++++------------------ 1 file changed, 13 insertions(+), 67 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs index aaf6e26..c9aac0b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs @@ -52,30 +52,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP public int Texture; /// Drip rate for asset packets public int Asset; - /// Drip rate for state packets - public int State; + /// Drip rate for the parent token bucket public int Total; - /// Maximum burst rate for resent packets - public int ResendLimit; - /// Maximum burst rate for land packets - public int LandLimit; - /// Maximum burst rate for wind packets - public int WindLimit; - /// Maximum burst rate for cloud packets - public int CloudLimit; - /// Maximum burst rate for task (state and transaction) packets - public int TaskLimit; - /// Maximum burst rate for texture packets - public int TextureLimit; - /// Maximum burst rate for asset packets - public int AssetLimit; - /// Maximum burst rate for state packets - public int StateLimit; - /// Burst rate for the parent token bucket - public int TotalLimit; - + /// Flag used to enable adaptive throttles + public bool AdaptiveThrottlesEnabled; + /// /// Default constructor /// @@ -86,26 +69,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP { IConfig throttleConfig = config.Configs["ClientStack.LindenUDP"]; - Resend = throttleConfig.GetInt("resend_default", 12500); - 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); - WindLimit = throttleConfig.GetInt("wind_limit", 18750); - CloudLimit = throttleConfig.GetInt("cloud_limit", 18750); - TaskLimit = throttleConfig.GetInt("task_limit", 18750); - TextureLimit = throttleConfig.GetInt("texture_limit", 55750); - AssetLimit = throttleConfig.GetInt("asset_limit", 27500); - StateLimit = throttleConfig.GetInt("state_limit", 37000); + Resend = throttleConfig.GetInt("resend_default", 6625); + Land = throttleConfig.GetInt("land_default", 9125); + Wind = throttleConfig.GetInt("wind_default", 1750); + Cloud = throttleConfig.GetInt("cloud_default", 1750); + Task = throttleConfig.GetInt("task_default", 18500); + Texture = throttleConfig.GetInt("texture_default", 18500); + Asset = throttleConfig.GetInt("asset_default", 10500); Total = throttleConfig.GetInt("client_throttle_max_bps", 0); - TotalLimit = Total; + + AdaptiveThrottlesEnabled = throttleConfig.GetBoolean("enable_adaptive_throttles", false); } catch (Exception) { } } @@ -128,34 +102,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP return Texture; case ThrottleOutPacketType.Asset: return Asset; - case ThrottleOutPacketType.State: - return State; - case ThrottleOutPacketType.Unknown: - default: - return 0; - } - } - - public int GetLimit(ThrottleOutPacketType type) - { - switch (type) - { - case ThrottleOutPacketType.Resend: - return ResendLimit; - case ThrottleOutPacketType.Land: - return LandLimit; - case ThrottleOutPacketType.Wind: - return WindLimit; - case ThrottleOutPacketType.Cloud: - return CloudLimit; - case ThrottleOutPacketType.Task: - return TaskLimit; - case ThrottleOutPacketType.Texture: - return TextureLimit; - case ThrottleOutPacketType.Asset: - return AssetLimit; - case ThrottleOutPacketType.State: - return StateLimit; case ThrottleOutPacketType.Unknown: default: return 0; -- cgit v1.1