← Paracosm·Docs/Handbook
Contents · Assets

Assets: the SQLite store, FSAssets, and keeping the store small

Every texture, mesh, sound, animation, script text, notecard and object a world uses is an asset: an immutable blob with a UUID. This chapter is about where a Paracosm keeps them, when OpenSim's file-system asset service (FSAssets) would be worth it, and how to keep the store from filling with copies nobody uses.

Where assets live now

What this house's store holds, measured read-only on a backup copy (2026-09-27, backups/...-100913/db/Asset.db, 1.07 GB):

type rows bytes of which the same bytes as another row
texture 1,487 652,072,297 491,382,256
mesh 1,721 337,567,565 218,730,838
script 19,787 27,026,183 7,679,444
sound 469 20,883,362 9,548,979
everything 25,945 1,051,423,366 728,705,641 (69.3%)

Two kinds of waste, then: 16,741 script rows nothing references any more (WorldBridge's old set_script leak, below), and copies: 25,945 rows hold only 12,881 distinct contents, mostly textures and meshes uploaded again under a new UUID each time a builder re-ran.

FSAssets: what it is

OpenSim.Services.FSAssetService.dll:FSAssetConnector (OpenSim/Services/FSAssetService) keeps each asset's data as a gzip-compressed file named by the SHA-256 of its content, under BaseDirectory in a 00/00/00 tree, and keeps only the metadata (UUID, name, type, the hash) in a database table (fsassets). Identical content uploaded under many UUIDs is one file on disk: on this house's numbers the 1.05 GB of data would be about 0.32 GB before compression. New assets are written through a spool directory by a background writer thread.

It cannot run on a SQLite-only Paracosm. Its metadata table goes through an IFSAssetDataPlugin, and OpenSimulator 0.9.3.0 has one for MySQL (MySQLFSAssetData) and one for PostgreSQL only. With OpenSim.Data.SQLite.dll as its storage provider it throws "Could not find a storage interface in the module" and the region's asset connector fails to start, which stops OpenSim. So FSAssets means running MySQL/MariaDB (or PostgreSQL) for at least its table. No SQLite FSAssets plugin has been written here.

When to switch

Stay on the SQLite store while:

Consider FSAssets when:

The config, for an install that has MySQL

Untested here. From Robust.ini.example's [AssetService] block (the grid version) and FSAssetConnector's constructor. On a standalone the region's asset connector loads LocalGridAssetService (RegionAssetConnectorModule), so that is the key to change, in StandaloneCommon.ini (an overlay line in config/StandaloneCommon-overlay.ini):

[AssetService]
    LocalServiceModule = "OpenSim.Services.FSAssetService.dll:FSAssetConnector"
    LocalGridAssetService = "OpenSim.Services.FSAssetService.dll:FSAssetConnector"
    ; data files, and the spool for new ones: on the same filesystem
    BaseDirectory = "./fsassets/data"
    SpoolDirectory = "./fsassets/tmp"
    ; its metadata table: required, and it must be MySQL or PostgreSQL
    StorageProvider = "OpenSim.Data.MySQL.dll"
    ConnectionString = "Data Source=localhost;Database=paracosm;User ID=paracosm;Password=...;Old Guids=true;"
    ; Realm = "fsassets"                   ; the table
    ; DaysBetweenAccessTimeUpdates = 30     ; fewer writes for often-read assets (default 0: every read)
    ; ShowConsoleStats = true               ; a read-stats line every minute (the default)
    ; UseOsgridFormat = false               ; 000/000 folders instead of 00/00/00

DefaultAssetLoader and AssetLoaderArgs (the OpenSim Library's assets) are read by FSAssets too; the standalone already sets them in [AssetService]. The service adds console commands: show assets, show digest <id>, delete asset <id>, and import / force import.

Moving the assets over

Keeping the SQLite store small