What is TurboRAM?

TurboRAM compresses cold memory pages inside RAM instead of writing them to disk swap, so a server holds more working data before it slows down.

TurboRAM gives a server more usable memory without adding any. It compresses memory pages that have gone cold and keeps them in RAM, instead of writing them out to the swap file on disk. Reading a compressed page back costs microseconds; reading a page back from disk costs milliseconds - a difference of a thousand times.

TurboRAM is on by default on every TurboStack server. You do not configure it.

Why it matters

A server under pressure has to move something out of memory. Without TurboRAM the only place to put it is the disk swap file, and a process that touches a swapped page then waits on storage. That is what "the server started swapping" means to a visitor: the site is technically up, and slow.

With TurboRAM the same page is compressed and stays in memory. The result is more room before the server has to touch disk at all, and more room again before it runs out of memory entirely.

Typical compression is around 2 to 3 times, so the memory that TurboRAM manages holds roughly two to three times what it would uncompressed.

A measured example

These are the figures from one production server, at one moment. Your own will differ.

  Value
Physical memory in the machine 32 gigabytes (GB)
Effective memory reported 41.01 GB
Extra headroom +9.01 GB, or 28% more
Compression ratio measured 3.10 times

It helps to see where that extra 9 GB comes from, because it is not free memory appearing out of nowhere. On that server, TurboRAM was holding about 13 GB of application data inside about 4 GB of physical memory. The other 28 GB was ordinary, uncompressed RAM. Add the 28 GB and the 13 GB together and you get the 41 GB the graph reports.

So the trade is: give up roughly 4 GB of ordinary memory, get roughly 13 GB of storage for cold pages in return. The busier the server, the more that difference is worth.

What compresses, and what does not

The ratio is not a platform setting. It is a property of your data, which is why the same feature gives one server 3 times and another barely 2.

Compresses well Compresses badly
Application memory: PHP processes, application objects, in-memory structures Images already stored as JPEG, PNG or WebP
Text: rendered pages, templates, log buffers, query results Video and audio files
Database and cache working memory holding text or numbers Anything encrypted, including Transport Layer Security (TLS) buffers
Repetitive data, such as many similar records in memory Archives and assets you already compressed yourself

A storefront serving pages built from a database is close to the ideal case. A media library streaming video is close to the worst, and gains little. Most real servers sit somewhere between the two, which is where the 2 to 3 times figure comes from.

What it costs

Compressing a page and reading it back is work for the processor, so TurboRAM trades a little Central Processing Unit (CPU) time for a lot of memory headroom. That trade is deliberately made cheap:

  • On the way in, pages are compressed with a fast method, so the cost lands on the write path where it is least noticeable.

  • Pages that then stay cold are re-compressed more densely later, on idle cycles, rather than while a visitor is waiting.

  • A page that is read back is decompressed once and released, so nothing pays the cost twice.

This is why the feature is on everywhere rather than offered as an option: the processor time it costs is small next to the storage wait it avoids.

How it fits with disk swap

TurboRAM does not replace the swap file - it sits in front of it as a faster first tier.

Tier What it is Speed
RAM Normal memory Fastest
TurboRAM Cold pages, compressed, still in RAM Fast
Disk swap The swap file on storage Slow

Pages move to TurboRAM first. Only when TurboRAM is full does the server fall back to the swap file on disk. Only when both are exhausted does the server run out of memory.

Reading it in the monitoring

The memory graphs on a host's Health tab show TurboRAM alongside physical memory, which is why a 32 GB server can report an effective capacity higher than 32 GB. That is not an error in the graph.

The capacity that TurboRAM reports is the amount of uncompressed data it will accept, not memory it has taken away from your applications. The physical memory it actually uses depends on how well your data compresses, is allocated only as pages arrive, and is released again as soon as a page is read back.

When it is not enough

TurboRAM buys headroom; it does not create memory that is not there. A server that is genuinely too small still needs more RAM. Signs that you have passed what TurboRAM can absorb:

  • The disk swap file is in constant use, not just occasionally.
  • Response times get worse as traffic rises, and recover when it falls.
  • Processes are being stopped by the server to reclaim memory.

See Server is out of memory for how to diagnose that, and Performance tuning for what to look at first.