Hello!
We’re experiencing a performance issue on our self-hosted Grist instance and would appreciate some guidance on optimization.
Environment:
-
Grist version: 1.7.12 (grist-core)
-
Deployment: docker-compose (grist-core + redis + nginx)
-
Document storage: MinIO (S3-compatible)
-
Document database: SQLite (default)
-
VM: 4 vCPU, 12 GB RAM
-
Scale: ~10 documents, ~30 users
Problem:
When opening large tables (documents with a large number of records) and importing data from CSV, we see a sharp spike in RAM usage. Logs and monitoring show that all records of a document are loaded entirely into memory. When several users open different “heavy” documents at the same time, RAM usage quickly hits the limit and Grist stops responding (hangs / doesn’t process requests).
Questions for the community:
-
Is there a way to limit or optimize the amount of data loaded into memory when opening a document (e.g., partial loading, backend-level pagination)?
-
Are there recommended environment variables (GRIST_*) for tuning memory usage in grist-core?
-
The bottleneck seems to be in the architecture of loading the document into memory (formula/table engine) — are there ways to work around this or reduce the load without changing the data itself?
-
Is there any established practice for horizontal scaling — would it help to distribute documents across multiple grist-core instances instead of one, to isolate the load?
-
What RAM/CPU limits are typically recommended per document/user at this kind of scale (10 documents, 30 users, some of them large)?
-
Are there any ready-made manifests/Helm charts or recommendations for deploying grist-core on Kubernetes? Does such a deployment offer advantages in scaling and load isolation compared to docker-compose?
I’d be grateful for any configuration advice, or links to relevant issues/discussions on this topic.
Thank you!