If you manage Windows endpoints that connect to self-hosted document portals—or if you simply enjoy watching systems engineers outsmart decades-old operating system behavior—this one is worth unpacking. Note right up front, though: this is strictly a server-side Linux memory optimization for Collabora Online deployments, not a patch for Microsoft Office, LibreOffice desktop, or Collabora's local Windows desktop clients.
Why Collabora Online Splits Every Document Into Its Own Process
To understand why a few scattered bytes triggered megabytes of wasted RAM, you first have to look at how Collabora Online keeps multi-user editing secure. Rather than lumping every user's spreadsheet and memo into one giant monolithic process, Collabora Online relies on a multi-process architecture coordinated by a main WebSocket daemon (WSD):
- Isolation via
kitprocesses: Every open document runs inside its own dedicated child process, known as a kit (or CoolKit). Each kit is locked inside its own process and filesystem jail so it has zero visibility into anyone else's files, and if a malformed document crashes one kit, everyone else keeps working uninterrupted. - The
forkitparent helper: Launching an entire office engine—complete with roughly eight million lines of core code, fonts, dictionaries, and settings—from scratch for every single document would obliterate server memory in minutes. Instead, a helper process called forkit starts once when the server boots, loads the office suite into memory, and never opens a document itself. - Sharing memory through Copy-on-Write (COW): Whenever a user opens a file,
forkitspawns a newkitas a forked copy of itself. Linux doesn't immediately duplicate all that loaded code; under Copy-on-Write, parent and child share the exact same physical memory pages until the child modifies something.
On paper, it is an elegant balance between strong sandboxing and lean RAM usage. In practice, there was a 4-kilobyte catch hiding in the heap.
The 4 KB Page Trap: How Tiny Gaps Triggered 39 MB of Collateral Copying
Here is where a well-behaved memory allocator accidentally sabotages Copy-on-Write. Linux manages virtual memory in fixed pages—historically 4,096 bytes (4 KB) apiece. Under Copy-on-Write, if a kit process alters even a single byte inside a memory page shared with forkit, the Linux kernel must duplicate the entire 4 KB page privately for that child process.
As Car explained in a November 24, 2026 developer blog post, forkit creates and discards swarms of tiny temporary objects—strings, lists, and configuration snippets—while initializing the office suite at startup. When those temporary objects are freed, the memory isn't handed back to the operating system; instead, it remains as microscopic empty gaps scattered across forkit's already-allocated pages.
Normally, standard memory allocators treat empty gaps like prime real estate, aggressively packing new allocations into leftover holes to keep a process compact. Unfortunately, every newly spawned kit inherits that Swiss-cheese memory map. The moment a kit opens a document and allocates a few dozen bytes of fresh data, the allocator drops them straight into those inherited gaps—which sit inside shared parent pages.
The amplification effect was dramatic. In Collabora's motivating example, opening a blank text document only required roughly 6.5 MB of genuinely new data inside the kit, yet it forced Linux to duplicate approximately 39 MB of shared parent pages just to accommodate tiny writes landing in scattered holes.
The Counterintuitive Fix: Allocate Memory to Save Memory
Car's solution sounds backwards until you trace the page boundaries: fill the gaps in forkit before spawning the first kit.
Right before forkit forks its first child process, it intentionally reserves all those leftover free spaces inside its own heap and never touches them again. Because those gaps sit inside memory pages forkit has already allocated, reserving them costs the parent process zero additional RAM.
When subsequent kit processes start up, their memory allocator scans the inherited heap, finds no free gaps available for reuse, and is forced to place new document allocations into fresh, tightly packed memory pages. All the shared pages containing code, fonts, and dictionaries remain completely untouched and shared across every active user.
According to Collabora, this one-time gap-filling routine takes roughly 11 milliseconds when the server starts. In Collabora's testing, forkit did not grow at all afterward, holding its exact footprint even after spawning 160 kits. As an added bonus, avoiding all those unnecessary 4 KB page duplications also spares the CPU cycles the kernel previously spent copying memory.
Collabora's Benchmark Numbers and What They Mean at Scale
To measure the real-world impact, Collabora tested the patched forkit behavior on a server equipped with 4 processor cores and 8 GB of RAM, ramping up load by adding 10 simulated users at a time, with each user opening a document and typing.
Per Collabora's published test table (reported alongside coverage from Phoronix and Neowin on November 24 and November 26, 2026), per-document memory usage dropped sharply across all three tested document categories:
| Workload and Concurrent Open Files | Before (Per Document) | After (Per Document) | Percentage Reduction | Memory Saved Per Document |
|---|---|---|---|---|
| Blank text document (100 open) | 53.9 MB | 24.4 MB | 55% | 29.5 MB |
| Writer document (70 open) | 73.6 MB | 47.8 MB | 35% | 25.8 MB |
| Impress presentation (50 open) | 72.1 MB | 50.3 MB | 30% | 21.8 MB |
Extrapolating from those measurements, Collabora estimates that a busy production server hosting 1,000 concurrent users could reclaim roughly 25 GB of RAM. That projection tracks cleanly with basic arithmetic—1,000 sessions saving 22 MB to 30 MB apiece lands right in the 22 GB to 30 GB neighborhood—though it remains an estimate rather than a separately executed 1,000-user benchmark.
What Windows IT Admins and Self-Hosters Should Keep in Mind
For IT teams supporting Windows users who collaborate in the browser via Collabora Online, Nextcloud Office, or ownCloud integrations, the practical takeaway is server density. Memory remains one of the primary bottlenecks scaling browser-based office suites. Shaving 22 MB to 30 MB off every active document allows existing virtual machines or containers to handle higher concurrency before hitting swap or out-of-memory kills—or lets organizations trim cloud VM memory tiers without sacrificing document isolation.
That said, a few healthy caveats apply before anyone starts recalculating hardware budgets:
- Vendor-supplied figures only: All timing, process-size, and memory-savings numbers come from Collabora's own test environment. The write-up does not disclose the underlying Linux distribution, kernel version, memory-accounting methodology, or statistical variance, nor does it publish concrete CPU, latency, or Calc spreadsheet benchmarks.
- No version number or admin toggle yet: While Car's post points to the underlying patch, Collabora has not yet specified which stable Collabora Online or Collabora Online Development Edition (CODE) release version ships the optimization, nor is there a user-facing
coolwsd.xmlsetting to toggle. Server administrators should watch upcoming container image and RPM/DEB changelogs rather than assuming current deployments already benefit. - Strictly a Linux
fork()COW pattern: Windows desktop users running Collabora Office—including the newer desktop suite bringing the Collabora Online UI locally to Windows alongside Collabora Office Classic—won't see a RAM drop from this patch, because local desktop suites and Windows process creation don't share memory via POSIXfork()Copy-on-Write pools.
Still, Car notes that Collabora's trick isn't necessarily unique to office suites: any Linux server daemon that pre-loads heavy assets in a parent process and relies on fork() plus Copy-on-Write to isolate worker processes could suffer from the exact same allocator-fragmentation penalty. No other major projects have confirmed adopting the pattern yet, but it is a textbook reminder that sometimes the sharpest performance wins come from understanding what your memory allocator is doing behind your back.
References
- Microsoft Office alternative Collabora gets a clever memory optimization missed earlier Neowin · 2026-11-26T20:12:01+00:00
- phoronix.com phoronix.com
- github.com github.com