diff options
author | Justin Clarke Casey | 2008-05-14 23:09:17 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-14 23:09:17 +0000 |
commit | e246d6e51588d75230800f4c36ee98867e25df56 (patch) | |
tree | f00455eaffdba1ed84287b6b49a3314cdb3053df /OpenSim | |
parent | * Minor: Fussy little wording change on inventory service failure (diff) | |
download | opensim-SC-e246d6e51588d75230800f4c36ee98867e25df56.zip opensim-SC-e246d6e51588d75230800f4c36ee98867e25df56.tar.gz opensim-SC-e246d6e51588d75230800f4c36ee98867e25df56.tar.bz2 opensim-SC-e246d6e51588d75230800f4c36ee98867e25df56.tar.xz |
* 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 this
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | 35 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs | 6 |
2 files changed, 33 insertions, 8 deletions
diff --git a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs index 3716f9b..fd021bc 100644 --- a/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Statistics/SimExtraStatsCollector.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Framework.Statistics | |||
42 | private long texturesInCache; | 42 | private long texturesInCache; |
43 | private long assetCacheMemoryUsage; | 43 | private long assetCacheMemoryUsage; |
44 | private long textureCacheMemoryUsage; | 44 | private long textureCacheMemoryUsage; |
45 | private long blockedMissingTextureRequests; | ||
45 | 46 | ||
46 | private long inventoryServiceRetrievalFailures; | 47 | private long inventoryServiceRetrievalFailures; |
47 | 48 | ||
@@ -49,6 +50,14 @@ namespace OpenSim.Framework.Statistics | |||
49 | public long TexturesInCache { get { return texturesInCache; } } | 50 | public long TexturesInCache { get { return texturesInCache; } } |
50 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } | 51 | public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } |
51 | public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } | 52 | public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } |
53 | |||
54 | /// <summary> | ||
55 | /// Number of persistent requests for missing textures we have started blocking from clients. To some extent | ||
56 | /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either | ||
57 | /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics | ||
58 | /// driver bugs on clients (though this seems less likely). | ||
59 | /// </summary> | ||
60 | public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } | ||
52 | 61 | ||
53 | /// <summary> | 62 | /// <summary> |
54 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not | 63 | /// Number of known failures to retrieve avatar inventory from the inventory service. This does not |
@@ -71,14 +80,20 @@ namespace OpenSim.Framework.Statistics | |||
71 | 80 | ||
72 | public void AddTexture(AssetBase image) | 81 | public void AddTexture(AssetBase image) |
73 | { | 82 | { |
74 | // Tedd: I added null check to avoid exception. Don't know if texturesInCache should ++ anyway? | ||
75 | if (image.Data != null) | 83 | if (image.Data != null) |
76 | { | 84 | { |
77 | texturesInCache++; | 85 | texturesInCache++; |
86 | |||
87 | // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates | ||
78 | textureCacheMemoryUsage += image.Data.Length; | 88 | textureCacheMemoryUsage += image.Data.Length; |
79 | } | 89 | } |
80 | } | 90 | } |
81 | 91 | ||
92 | public void AddBlockedMissingTextureRequest() | ||
93 | { | ||
94 | blockedMissingTextureRequests++; | ||
95 | } | ||
96 | |||
82 | public void AddInventoryServiceRetrievalFailure() | 97 | public void AddInventoryServiceRetrievalFailure() |
83 | { | 98 | { |
84 | inventoryServiceRetrievalFailures++; | 99 | inventoryServiceRetrievalFailures++; |
@@ -116,14 +131,22 @@ namespace OpenSim.Framework.Statistics | |||
116 | public string Report() | 131 | public string Report() |
117 | { | 132 | { |
118 | StringBuilder sb = new StringBuilder(Environment.NewLine); | 133 | StringBuilder sb = new StringBuilder(Environment.NewLine); |
119 | sb.Append("ASSET CACHE STATISTICS"); | 134 | sb.Append("ASSET STATISTICS"); |
135 | sb.Append(Environment.NewLine); | ||
136 | sb.Append( | ||
137 | string.Format( | ||
138 | @"Asset cache contains {0,6} assets using {1,10:0.000}K" + Environment.NewLine, | ||
139 | AssetsInCache, AssetCacheMemoryUsage / 1024.0)); | ||
140 | |||
141 | sb.Append(Environment.NewLine); | ||
142 | sb.Append("TEXTURE STATISTICS"); | ||
120 | sb.Append(Environment.NewLine); | 143 | sb.Append(Environment.NewLine); |
121 | sb.Append( | 144 | sb.Append( |
122 | string.Format( | 145 | string.Format( |
123 | @"Asset cache contains {0,6} assets using {1,10:0.000}K | 146 | @"Texture cache contains {0,6} textures using {1,10:0.000}K |
124 | Texture cache contains {2,6} textures using {3,10:0.000}K" + Environment.NewLine, | 147 | Blocked requests for missing textures: {2}" + Environment.NewLine, |
125 | AssetsInCache, AssetCacheMemoryUsage / 1024.0, | 148 | TexturesInCache, TextureCacheMemoryUsage / 1024.0, |
126 | TexturesInCache, TextureCacheMemoryUsage / 1024.0)); | 149 | BlockedMissingTextureRequests)); |
127 | 150 | ||
128 | sb.Append(Environment.NewLine); | 151 | sb.Append(Environment.NewLine); |
129 | sb.Append("INVENTORY STATISTICS"); | 152 | sb.Append("INVENTORY STATISTICS"); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs index 12ee278..d4fa39f 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs | |||
@@ -31,6 +31,7 @@ using libsecondlife; | |||
31 | using log4net; | 31 | using log4net; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications.Limit; | 33 | using OpenSim.Framework.Communications.Limit; |
34 | using OpenSim.Framework.Statistics; | ||
34 | using OpenSim.Region.Environment.Interfaces; | 35 | using OpenSim.Region.Environment.Interfaces; |
35 | using OpenSim.Region.Environment.Scenes; | 36 | using OpenSim.Region.Environment.Scenes; |
36 | 37 | ||
@@ -125,10 +126,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload | |||
125 | { | 126 | { |
126 | if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID)) | 127 | if (missingTextureLimitStrategy.IsFirstRefusal(e.RequestedAssetID)) |
127 | { | 128 | { |
129 | if (StatsManager.SimExtraStats != null) | ||
130 | StatsManager.SimExtraStats.AddBlockedMissingTextureRequest(); | ||
131 | |||
128 | // Commenting out this message for now as it causes too much noise with other | 132 | // Commenting out this message for now as it causes too much noise with other |
129 | // debug messages. | 133 | // debug messages. |
130 | // TODO: possibly record this as a statistic in the future | ||
131 | // | ||
132 | // m_log.DebugFormat( | 134 | // m_log.DebugFormat( |
133 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", | 135 | // "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests", |
134 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); | 136 | // e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS); |