mirror of
https://github.com/jamenai/opensim-addon-modules-exp.git
synced 2026-07-27 21:10:25 +00:00
init add ConcurrentFlotsamAssetCache modul
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# COMPARISON
|
||||
|
||||
## Comparison to FlotsamAssetCache (ENG)
|
||||
|
||||
| Aspect | ConcurrentFlotsamAssetCache | FlotsamAssetCache (Core) |
|
||||
|---|---|---|
|
||||
| Parallelism | High parallelism for reads/writes; reduced contention | Lower parallelism; possible bottlenecks due to locks/single-writer |
|
||||
| Latency under load | Lower at peaks; higher throughput | Higher at peaks; waits due to serialization |
|
||||
| Thundering herd handling | Better coordination of concurrent requests for the same asset | Simpler but may trigger redundant fetches on concurrent requests |
|
||||
| Consistency/ordering | More complex ordering of touch/replace; careful sync needed | More deterministic; fewer race conditions |
|
||||
| Debugging/maintenance | More complex, harder to debug | Simpler, easier to reason about |
|
||||
| Resource usage | Higher (more threads/concurrent structures) | Lower overhead |
|
||||
| Memory footprint | Slightly higher (concurrent data structures, coordination) | Lower |
|
||||
| Concurrency risk | Increased risk (livelock/starvation if misconfigured) | Lower risk |
|
||||
| I/O behavior | More parallel I/O, can better utilize fast storage | More serialized/controlled I/O; predictable but limited throughput |
|
||||
| Expire/cleanup interaction | More sensitive to LastAccessTime/ordering with parallel updates | Simpler expire logic due to consistent timestamps |
|
||||
| Fit – large load/cluster | Very good (scales, smooths spikes) | Limited |
|
||||
| Fit – small setups | May be overkill | Very good (simple, frugal) |
|
||||
| Overall | Better for high parallelism and throughput with higher complexity | Better for simplicity, predictability, and minimal resources |
|
||||
|
||||
## Vergleich zu FlotsamAssetCache (DEU)
|
||||
|
||||
| Aspekt | ConcurrentFlotsamAssetCache | FlotsamAssetCache (Core) |
|
||||
|---|---|---|
|
||||
| Parallelität | Hohe Parallelität bei Reads/Writes; weniger Contention | Geringere Parallelität; mögliche Engpässe durch Locks/Single-Writer |
|
||||
| Latenz unter Last | Niedriger bei Peaks; bessere Durchsatzraten | Höher bei Peaks; Wartezeiten durch Serialisierung |
|
||||
| Thundering herd Handling | Bessere Koordination gleichzeitiger Zugriffe auf dasselbe Asset | Einfachere, aber potenziell redundante Zugriffe bei gleichzeitigen Requests |
|
||||
| Konsistenz/Ordnung | Komplexere Ordnung von Touch/Replace; sorgfältige Synchronisation nötig | Deterministischer und einfacher; weniger Race-Conditions |
|
||||
| Fehlersuche/Wartung | Komplexer, schwieriger zu debuggen | Einfacher, besser nachvollziehbar |
|
||||
| Ressourcenverbrauch | Höher (mehr Threads/Concurrent-Strukturen) | Geringer (weniger Overhead) |
|
||||
| Speicherbedarf | Etwas höher (Concurrent-Datenstrukturen, Koordination) | Niedriger |
|
||||
| Risiko von Concurrency-Bugs | Erhöht (Livelock/Starvation bei falscher Strategie) | Geringer |
|
||||
| I/O-Verhalten | Mehr paralleler I/O, potenziell bessere Nutzung schneller Speicher | Serieller/koordinierter I/O, planbarer aber limitierter Durchsatz |
|
||||
| Expire-/Cleanup-Interaktion | Sensibler bzgl. LastAccessTime/Ordnung bei parallelen Updates | Einfachere Expire-Logik durch konsistentere Zeitstempel |
|
||||
| Eignung – große Last/Cluster | Sehr gut (Skalierung, Spitzen abfedern) | Eingeschränkt |
|
||||
| Eignung – kleine Setups | Overkill möglich | Sehr gut (einfach, genügsam) |
|
||||
| Gesamtfazit | Besser für hohe Parallelität und Durchsatz mit höherer Komplexität | Besser für Einfachheit, Vorhersagbarkeit und geringen Ressourcenbedarf |
|
||||
|
||||
Hinweis: Wähle Concurrent für stark parallelisierte Workloads; nutze Core, wenn Einfachheit und Stabilität wichtiger sind als maximale Skalierung.
|
||||
@@ -0,0 +1,2 @@
|
||||
# OpenSimConcurrentFlotsamAssetCache
|
||||
|
||||
+1784
File diff suppressed because it is too large
Load Diff
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" ?>
|
||||
<Project frameworkVersion="v8_0" name="OpenSimConcurrentFlotsamAssetCache.Modules" path="addon-modules/OpenSimConcurrentFlotsamAssetCache/Modules" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../bin/</ReferencePath>
|
||||
<Reference name="OpenMetaverseTypes"/>
|
||||
<Reference name="OpenMetaverse"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Monitoring"/>
|
||||
<Reference name="OpenSim.Region.Framework"/>
|
||||
<Reference name="OpenSim.Region.Framework.Interfaces"/>
|
||||
<Reference name="OpenSim.Region.Framework.Scenes"/>
|
||||
<Reference name="OpenSim.Server.Base"/>
|
||||
<Reference name="OpenSim.Services.Interfaces"/>
|
||||
<Reference name="Nini"/>
|
||||
<Reference name="log4net"/>
|
||||
<Reference name="Mono.Addins"/>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,6 @@
|
||||
[Modules]
|
||||
; Select which asset cache module to use.
|
||||
; Must match the module's Name property (here: "ConcurrentFlotsamAssetCache").
|
||||
; If you want to override the default FlotsamAssetCache, set this to ConcurrentFlotsamAssetCache.
|
||||
AssetCaching = ConcurrentFlotsamAssetCache
|
||||
Include-ConcurrentFlotsamCache = "config-include/ConcurrentFlotsamAssetCache.ini"
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
; config-include/ConcurrentFlotsamAssetCache.ini
|
||||
[AssetCache]
|
||||
; Enable or disable the file-based cache. If false, assets won't be cached on disk.
|
||||
FileCacheEnabled = true
|
||||
|
||||
; Root directory where cached asset files are stored. Can be absolute or relative to OpenSim.exe.
|
||||
CacheDirectory = c_assetcache
|
||||
|
||||
; Enable or disable the in-memory cache for faster lookups.
|
||||
MemoryCacheEnabled = true
|
||||
|
||||
; Memory cache timeout in hours (floating point). Internally converted to seconds.
|
||||
; Small values keep RAM usage lower; larger values increase hit rate.
|
||||
MemoryCacheTimeout = 0.25
|
||||
|
||||
; Enable negative cache to remember "not found" results for a short time and reduce upstream load.
|
||||
NegativeCacheEnabled = true
|
||||
|
||||
; Negative cache TTL in seconds. During this time, repeated misses for the same ID will be short-circuited.
|
||||
NegativeCacheTimeout = 120
|
||||
|
||||
; Update the file's last-access time on cache hits (touch). Helps expiration logic but can be expensive on some filesystems.
|
||||
; This is throttled internally to avoid touching too frequently.
|
||||
UpdateFileTimeOnCacheHit = true
|
||||
|
||||
; Logging detail for this module (0=minimal, 1=info, 2=verbose warnings).
|
||||
LogLevel = 0
|
||||
|
||||
; Display hit-rate statistics every N requests (0 disables).
|
||||
HitRateDisplay = 100
|
||||
|
||||
; How long (in hours) files may stay in cache since last access before the background cleaner removes them.
|
||||
FileCacheTimeout = 48
|
||||
|
||||
; How often (in hours) the background cleaner runs to purge expired files.
|
||||
FileCleanupTimer = 1.0
|
||||
|
||||
; Directory sharding: number of tier levels (1..3). Increases number of nested directories to keep folders smaller.
|
||||
CacheDirectoryTiers = 1
|
||||
|
||||
; Directory sharding: number of characters per tier segment (1..4). Short segments mean more subfolders.
|
||||
CacheDirectoryTierLength = 3
|
||||
|
||||
; Warn if a single cache directory contains more than this many entries (helps tuning tiering/expiration).
|
||||
CacheWarnAt = 30000
|
||||
Reference in New Issue
Block a user