* Start recording as a statistic the number of times we start blocking repetitive client requests for the same missing texture
* This is to maintain some visibility on the problem, since I removed the intentionally irritating log messages for this0.6.0-stable
parent
1ef37b196c
commit
e246d6e515
|
@ -42,6 +42,7 @@ namespace OpenSim.Framework.Statistics
|
|||
private long texturesInCache;
|
||||
private long assetCacheMemoryUsage;
|
||||
private long textureCacheMemoryUsage;
|
||||
private long blockedMissingTextureRequests;
|
||||
|
||||
private long inventoryServiceRetrievalFailures;
|
||||
|
||||
|
@ -49,6 +50,14 @@ namespace OpenSim.Framework.Statistics
|
|||
public long TexturesInCache { get { return texturesInCache; } }
|
||||
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
|
||||
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
|
||||
|
||||
/// <summary>
|
||||
/// Number of persistent requests for missing textures we have started blocking from clients. To some extent
|
||||
/// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
|
||||
/// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
|
||||
/// driver bugs on clients (though this seems less likely).
|
||||
/// </summary>
|
||||
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
|
||||
|
||||
/// <summary>
|
||||
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not
|
||||
|
@ -71,14 +80,20 @@ namespace OpenSim.Framework.Statistics
|
|||
|
||||
public void AddTexture(AssetBase image)
|
||||
{
|
||||
// Tedd: I added null check to avoid exception. Don't know if texturesInCache should ++ anyway?
|
||||
if (image.Data != null)
|
||||
{
|
||||
texturesInCache++;
|
||||
|
||||
// This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
|
||||
textureCacheMemoryUsage += image.Data.Length;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddBlockedMissingTextureRequest()
|
||||
{
|
||||
blockedMissingTextureRequests++;
|
||||
}
|
||||
|
||||
public void AddInventoryServiceRetrievalFailure()
|
||||
{
|
||||
inventoryServiceRetrievalFailures++;
|
||||
|
@ -116,14 +131,22 @@ namespace OpenSim.Framework.Statistics
|
|||
public string Report()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(Environment.NewLine);
|
||||
sb.Append("ASSET CACHE STATISTICS");
|
||||
sb.Append("ASSET STATISTICS");
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(
|
||||
string.Format(
|
||||
@"Asset cache contains {0,6} assets using {1,10:0.000}K
|
||||
Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine,
|
||||
AssetsInCache, AssetCacheMemoryUsage / 1024.0,
|
||||
TexturesInCache, TextureCacheMemoryUsage / 1024.0));
|
||||
@"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine,
|
||||
AssetsInCache, AssetCacheMemoryUsage / 1024.0));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("TEXTURE STATISTICS");
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append(
|
||||
string.Format(
|
||||
@"Texture cache contains {0,6} textures using {1,10:0.000}K
|
||||
Blocked requests for missing textures: {2}" + Environment.NewLine,
|
||||
TexturesInCache, TextureCacheMemoryUsage / 1024.0,
|
||||
BlockedMissingTextureRequests));
|
||||
|
||||
sb.Append(Environment.NewLine);
|
||||
sb.Append("INVENTORY STATISTICS");
|
||||
|
|
|
@ -31,6 +31,7 @@ using libsecondlife;
|
|||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Limit;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
|
@ -125,10 +126,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
|
|||
{
|
||||
if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID))
|
||||
{
|
||||
if (StatsManager.SimExtraStats != null)
|
||||
StatsManager.SimExtraStats.AddBlockedMissingTextureRequest();
|
||||
|
||||
// Commenting out this message for now as it causes too much noise with other
|
||||
// debug messages.
|
||||
// TODO: possibly record this as a statistic in the future
|
||||
//
|
||||
// m_log.DebugFormat(
|
||||
// "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests",
|
||||
// e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);
|
||||
|
|
14
prebuild.xml
14
prebuild.xml
|
@ -752,17 +752,20 @@
|
|||
<Reference name="System" localCopy="false"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Drawing"/>
|
||||
<Reference name="System.Runtime.Remoting"/>
|
||||
<Reference name="System.Runtime.Remoting"/>
|
||||
<Reference name="libsecondlife.dll"/>
|
||||
<Reference name="Axiom.MathLib.dll"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Data" />
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<!-- Unit tests -->
|
||||
<Reference name="OpenSim.Tests.Common"/>
|
||||
<Reference name="nunit.framework.dll"/>
|
||||
<Reference name="OpenSim.Framework.Statistics"/>
|
||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||
|
||||
<!-- Unit tests -->
|
||||
<Reference name="OpenSim.Tests.Common"/>
|
||||
<Reference name="nunit.framework.dll"/>
|
||||
|
||||
<!-- For scripting in funny languages by default -->
|
||||
<Reference name="Microsoft.JScript"/>
|
||||
<Reference name="XMLRPC.dll"/>
|
||||
|
@ -770,6 +773,7 @@
|
|||
<Reference name="OpenSim.Data.Base"/>
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="log4net"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
|
|
Loading…
Reference in New Issue