Stack Matrix Hub (11)
PostgreSQL 16 shared_buffers & oc_filecache Index Sizing
Keep oc_filecache and oc_activity B-tree indexes resident in RAM as shared repositories grow past 5 million files.
1-4 GB shared_buffers · oc_filecache RAM · NVMe WAL
How oc_filecache Grows with Small-File Repositories
A 4 TB repository holding 6 million small code or design files creates a vastly larger oc_filecache index than a 4 TB video archive. Keeping Postgres shared_buffers at 20-25% of host RAM keeps directory listings instantaneous.
Separating Postgres WAL onto NVMe
When pairing bulk HDD/hybrid storage for NEXTCLOUD_DATADIR on large archives, keeping Docker named volumes (Postgres + Redis) on fast NVMe keeps WebDAV PROPFIND directory scans under 60 ms.
Measured Thresholds & Configuration
| Indexed File Count | oc_filecache Size | Postgres shared_buffers | Disk Class |
|---|---|---|---|
| < 500k files | 350 MB | 512 MB | SSD / NVMe |
| 500k - 3M files | 1.8 GB | 1.5 - 2.0 GB | NVMe |
| 3M - 12M files | 5.5 GB | 4.0 GB | Dedicated NVMe VDS |