diff options
author | Melanie Thielker | 2009-07-29 17:21:36 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-07-29 17:21:36 +0000 |
commit | cbeebc209d47f9e2498cae8c25884282cb7f9aa2 (patch) | |
tree | 07a735c8f67e62b76c2bceba5eac9a435e71da13 | |
parent | Patch from Kai Ludwig: Fix prim drawing on maptile. (diff) | |
download | opensim-SC-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.zip opensim-SC-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.gz opensim-SC-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.bz2 opensim-SC-cbeebc209d47f9e2498cae8c25884282cb7f9aa2.tar.xz |
Thank you, coyled, for a patch to change Flotsamcache path generation
to avoid directory overflow.
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 8 | ||||
-rw-r--r-- | bin/config-include/FlotsamCache.ini.example | 11 |
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 35d726f..bcdcfab 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -94,7 +94,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
94 | /// WaitOnInprogressTimeout = 3000 | 94 | /// WaitOnInprogressTimeout = 3000 |
95 | /// | 95 | /// |
96 | /// ; Number of tiers to use for cache directories (current valid range 1 to 3) | 96 | /// ; Number of tiers to use for cache directories (current valid range 1 to 3) |
97 | /// CacheDirectoryTiers = 2 | 97 | /// CacheDirectoryTiers = 1 |
98 | /// | 98 | /// |
99 | /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K | 99 | /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K |
100 | /// CacheDirectoryTierLength = 3 | 100 | /// CacheDirectoryTierLength = 3 |
@@ -148,7 +148,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
148 | private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero; | 148 | private TimeSpan m_FileExpirationCleanupTimer = TimeSpan.Zero; |
149 | 149 | ||
150 | private static int m_CacheDirectoryTiers = 1; | 150 | private static int m_CacheDirectoryTiers = 1; |
151 | private static int m_CacheDirectoryTierLen = 4; | 151 | private static int m_CacheDirectoryTierLen = 3; |
152 | private static int m_CacheWarnAt = 30000; | 152 | private static int m_CacheWarnAt = 30000; |
153 | 153 | ||
154 | private System.Timers.Timer m_CachCleanTimer = new System.Timers.Timer(); | 154 | private System.Timers.Timer m_CachCleanTimer = new System.Timers.Timer(); |
@@ -228,7 +228,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
228 | m_CacheDirectoryTiers = 3; | 228 | m_CacheDirectoryTiers = 3; |
229 | } | 229 | } |
230 | 230 | ||
231 | m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLen", 1); | 231 | m_CacheDirectoryTierLen = assetConfig.GetInt("CacheDirectoryTierLength", 3); |
232 | if (m_CacheDirectoryTierLen < 1) | 232 | if (m_CacheDirectoryTierLen < 1) |
233 | { | 233 | { |
234 | m_CacheDirectoryTierLen = 1; | 234 | m_CacheDirectoryTierLen = 1; |
@@ -507,7 +507,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
507 | string path = m_CacheDirectory; | 507 | string path = m_CacheDirectory; |
508 | for (int p = 1; p <= m_CacheDirectoryTiers; p++) | 508 | for (int p = 1; p <= m_CacheDirectoryTiers; p++) |
509 | { | 509 | { |
510 | string pathPart = id.Substring(id.Length - (p * m_CacheDirectoryTierLen), m_CacheDirectoryTierLen); | 510 | string pathPart = id.Substring((p - 1) * m_CacheDirectoryTierLen, m_CacheDirectoryTierLen); |
511 | path = Path.Combine(path, pathPart); | 511 | path = Path.Combine(path, pathPart); |
512 | } | 512 | } |
513 | 513 | ||
diff --git a/bin/config-include/FlotsamCache.ini.example b/bin/config-include/FlotsamCache.ini.example index e49b804..feb3897 100644 --- a/bin/config-include/FlotsamCache.ini.example +++ b/bin/config-include/FlotsamCache.ini.example | |||
@@ -37,3 +37,14 @@ | |||
37 | ; long (in miliseconds) to block a request thread while trying to complete | 37 | ; long (in miliseconds) to block a request thread while trying to complete |
38 | ; an existing write to disk. | 38 | ; an existing write to disk. |
39 | ; WaitOnInprogressTimeout = 3000 | 39 | ; WaitOnInprogressTimeout = 3000 |
40 | |||
41 | ; Number of tiers to use for cache directories (current valid | ||
42 | ; range 1 to 3) | ||
43 | ;CacheDirectoryTiers = 1 | ||
44 | |||
45 | ; Number of letters per path tier, 1 will create 16 directories | ||
46 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K | ||
47 | ;CacheDirectoryTierLength = 3 | ||
48 | |||
49 | ; Warning level for cache directory size | ||
50 | ;CacheWarnAt = 30000 | ||