Skip to content

Compression

The cached response body is stored in your chosen backend (Filesystem / Redis / APCu). When Enable Cache Compression is on (default), the stored payload is gzip-compressed at the chosen level. This trades a small CPU cost for disk / memory savings of 40–60%.

Configured under Settings → Speed Boost → Core → Cache Storage.

  • Compresses the response body before writing to the backend
  • Decompresses on read before serving
  • It does not compress the HTTP response sent to the client — your web server / reverse proxy handles that (gzip on in Nginx, mod_deflate in Apache, Brotli at the CDN, etc.).
  • It does not affect Varnish — Varnish stores its own representation.
  • It does not affect the database tables — p2lab_cache_entry metadata is uncompressed.
LevelTypical ratioCPU cost (relative)When to pick
1~30%very lowHigh-traffic store on cheap CPU
3~40%lowBalanced low-cost
6~50%medium (recommended)Default for most stores
9~55%highDisk- / memory-bound, low traffic

Numbers are rough averages over typical Shopware product pages (40–200 KB HTML). Bigger pages compress better; tiny pages may end up slightly larger than uncompressed thanks to the gzip frame overhead.

  • Filesystem backend, disk-bound host — yes, almost always. Reading a smaller file from disk is often faster than reading a larger one even after decompression.
  • Redis backend, memory-constrained instance — yes. Compression typically halves your maxmemory footprint.
  • APCu backend, small apc.shm_size — yes, compression buys you more cached pages in the same allocation.
  • APCu backend, generous apc.shm_size, latency-sensitive endpoints — maybe disable. The decompress cost adds microseconds; for very small payloads it can be net-negative.
  • You’re profiling and every microsecond on the cache HIT path matters more than disk / memory savings.
  • Your backend is already compressing transparently (most aren’t).
  • Your responses are all very small (< 5 KB).

The dashboard reports:

  • Total cached size — current backend footprint
  • Total original size — what it would be without compression
  • Total space saved — the difference
  • Average cache-hit time — includes decompression

Toggle compression off, run a representative warmup, note the numbers. Toggle on, run again. Compare.

The compression toggle and level are per sales channel, but in practice you almost always pick one global setting. A mixed setup adds operational complexity and the per-channel benefit is marginal.