From 0d2e6463d714bce8a6a628bd647c625feeeae8f6 Mon Sep 17 00:00:00 2001
From: John Hurliman
Date: Wed, 14 Oct 2009 11:43:31 -0700
Subject: * Minimized the number of times textures are pulled off the priority
queue * OnQueueEmpty is still called async, but will not be called for a
given category if the previous callback for that category is still running.
This is the most balanced behavior I could find, and seems to work well *
Added support for the old [ClientStack.LindenUDP] settings (including setting
the receive buffer size) and added the new token bucket and global throttle
settings * Added the AssetLoaderEnabled config variable to optionally disable
loading assets from XML every startup. This gives a dramatic improvement in
startup times for those who don't need the functionality every startup
---
.../Region/ClientStack/LindenUDP/ThrottleRates.cs | 36 +++++++++++++---------
1 file changed, 22 insertions(+), 14 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 858a03c..adad4c3 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs
@@ -51,6 +51,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int Texture;
/// Drip rate for asset packets
public int Asset;
+ /// Drip rate for the parent token bucket
+ public int Total;
/// Maximum burst rate for resent packets
public int ResendLimit;
@@ -66,6 +68,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public int TextureLimit;
/// Maximum burst rate for asset packets
public int AssetLimit;
+ /// Burst rate for the parent token bucket
+ public int TotalLimit;
///
/// Default constructor
@@ -77,21 +81,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
IConfig throttleConfig = config.Configs["ClientStack.LindenUDP"];
- Resend = throttleConfig.GetInt("ResendDefault", 12500);
- Land = throttleConfig.GetInt("LandDefault", 500);
- Wind = throttleConfig.GetInt("WindDefault", 500);
- Cloud = throttleConfig.GetInt("CloudDefault", 500);
- Task = throttleConfig.GetInt("TaskDefault", 500);
- Texture = throttleConfig.GetInt("TextureDefault", 500);
- Asset = throttleConfig.GetInt("AssetDefault", 500);
+ Resend = throttleConfig.GetInt("resend_default", 12500);
+ Land = throttleConfig.GetInt("land_default", 500);
+ Wind = throttleConfig.GetInt("wind_default", 500);
+ Cloud = throttleConfig.GetInt("cloud_default", 500);
+ Task = throttleConfig.GetInt("task_default", 500);
+ Texture = throttleConfig.GetInt("texture_default", 500);
+ Asset = throttleConfig.GetInt("asset_default", 500);
- ResendLimit = throttleConfig.GetInt("ResendLimit", 18750);
- LandLimit = throttleConfig.GetInt("LandLimit", 29750);
- WindLimit = throttleConfig.GetInt("WindLimit", 18750);
- CloudLimit = throttleConfig.GetInt("CloudLimit", 18750);
- TaskLimit = throttleConfig.GetInt("TaskLimit", 55750);
- TextureLimit = throttleConfig.GetInt("TextureLimit", 55750);
- AssetLimit = throttleConfig.GetInt("AssetLimit", 27500);
+ Total = throttleConfig.GetInt("client_throttle_max_bps", 0);
+
+ 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", 55750);
+ TextureLimit = throttleConfig.GetInt("texture_limit", 55750);
+ AssetLimit = throttleConfig.GetInt("asset_limit", 27500);
+
+ TotalLimit = throttleConfig.GetInt("client_throttle_max_bps", 0);
}
catch (Exception) { }
}
--
cgit v1.1