Collabora says a Linux fork and copy-on-write optimization reduced per-document memory use by about 55% for blank text files, 35% for Writer documents and 30% for Impress presentations.
Collabora Online, a cloud-based office suite built on LibreOffice and positioned as a self-hosted alternative to Microsoft 365, has reported a memory-efficiency improvement for its document processes.
The system uses a parent process called forkit to load the office suite once, then creates separate document processes with Linux fork. The processes initially share read-only memory through copy-on-write, but small gaps in allocated memory could cause entire 4 KB pages to be copied when only a few bytes changed.
Collabora’s approach fills those gaps in forkit before the first document process is created, helping new data use fresh pages while keeping unchanged pages shareable. The operation runs once when the server starts, takes about 11 milliseconds and did not increase the parent process’s memory use in a test with 160 document processes.
On a server with four CPU cores and 8 GB of memory, tests with 10 users showed blank text documents falling from 53.9 MB to 24.4 MB per document, Writer documents from 73.6 MB to 47.8 MB, and Impress presentations from 72.1 MB to 50.3 MB. Collabora estimates the optimization could save up to 25 GB of memory on a heavily loaded server serving about 1,000 users.