Skip to main content
NextcloudAIO
NextcloudAIO Partner Disclosure: Outbound /go/ links marked rel="sponsored" may earn a referral commission at zero extra cost (Partner Disclosure).
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

PostgreSQL 16 shared_buffers & oc_filecache Index Sizing
Telemetry verified 2026-11-15 by TeamDrive Storage.

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 Countoc_filecache SizePostgres shared_buffersDisk Class
< 500k files350 MB512 MBSSD / NVMe
500k - 3M files1.8 GB1.5 - 2.0 GBNVMe
3M - 12M files5.5 GB4.0 GBDedicated NVMe VDS
1-4 GB shared_buffers · oc_filecache RAM · NVMe WAL InterServer ($6/TB)UltaHost VDS ($37.50)