Performance tuning

Make TurboStack sites fast with Redis, Varnish and OPcache caching, and learn when to override the auto-tuned memory and database defaults.

TurboStack ships with sensible, server-aware defaults so most sites are fast by default. This page explains the caching layers available to you and how to override the defaults safely.

Faster pages improve conversion and search ranking, and they keep your site responsive during traffic peaks such as sales campaigns. For online stores, caching is the main tool for staying fast under load.

Caching layers

Caching is the highest-impact lever for most sites. TurboStack provides several layers, each suited to a different workload.

Layer What it caches Notes
Redis (port 6379) Transient application cache Safe to clear at any time
Redis (port 6378) Durable sessions and queues Persistent - do not clear casually
Varnish Full-page HyperText Markup Language (HTML) responses For PHP storefronts (Magento, Shopware, WordPress)
OPcache Compiled PHP bytecode Per-application; see PHP advanced options

Redis

The cache instance on port 6379 holds transient data and is safe to clear. The persistent instance on port 6378 stores durable data such as sessions and queues, so clearing it can log users out or drop queued jobs. Configure Redis from the host's Services tab.

Varnish

Varnish is a full-page cache that sits in front of PHP storefronts. It is most effective for read-heavy catalog and content pages on Magento, Shopware, and WordPress.

OPcache

OPcache stores compiled PHP bytecode so scripts do not have to be recompiled on every request. You can tune it per application under Applications > Technologies > PHP advanced options, where you can enhance OPcache and set a preload script.

Sizing keys you can override

These values are auto-tuned to your server by default. Change them only with evidence.

Key What it controls
mysql_innodb_size InnoDB buffer pool size for MySQL/MariaDB
postgresql_shared_buffers Shared memory PostgreSQL uses for caching data
redis_memory Maximum memory Redis may use before eviction
elasticsearch_heap_size Java Virtual Machine (JVM) heap allocated to Elasticsearch
varnish_cache_size Memory reserved for the Varnish full-page cache

PHP-FPM and OPcache

PHP performance is tuned per application. Under Applications > Technologies, the PHP advanced settings let you adjust the PHP-FPM process manager (pm start, min spare, and max spare servers) and enable OPcache preloading. Raise the PHP-FPM worker counts only when you see requests queuing and have the memory headroom to support them. Each worker is one PHP process handling one request at a time.

Measure first

Always find the real bottleneck before changing anything. A slow page is often caused by a single layer (database, cache, or PHP) and tuning the wrong one wastes effort.

  1. Check the host's Health tab for resource pressure.
  2. Use Monitoring to inspect trends over time.
  3. See Monitoring concepts to understand what the metrics mean.

Once you have identified the constrained resource, apply the smallest override that relieves it and re-measure.