What turbo mode gives

A persistent process keeps the indexes of all sets in memory and answers filter AJAX requests without starting MODX. Measured on 500k products: regular endpoint 37–45 ms, turbo 17–27 ms, the same request repeated ~4 ms; on 2k products — 7–11 ms instead of 21–24 ms. The first page load goes through MODX as usual.

Needed: a VDS with console access, PHP CLI with the pcntl and posix extensions, nginx, systemd (or supervisor). Memory — about the size of all set indexes; workers share it with the main process.

Turbo mode is optional. Everything works without it: pages use the regular endpoint publicConnector.php.

Enabling

The texts below contain this site's paths. The service user is the same user the site's php-fpm pool runs as.

  1. systemd service — create the file and start it:
    @@unit@@
  2. nginx — add to the site's server { } and reload nginx (nginx -t && systemctl reload nginx). The nginx user needs access to the socket (mode 0660 — nginx must be in the site user's group):
    @@nginx@@
  3. Setting — Settings tab → Turbo mode → address /bitfacet-turbo (the bitfacet.turbo_url system setting) → "Check connection": both items must be green.
  4. Check — the Turbo mode block on Overview shows "Running"; filter responses have the X-BitFacet: turbo header.

How it behaves

Options and maintenance

--workers=4concurrent requests (usually the number of cores)
--max-requests=10000a worker restarts after this many requests
--memory=256a worker restarts if its memory grew by this many MB
--socket=own socket path (default turbo.sock in the index folder)
systemctl status @@service@@      # status
systemctl restart @@service@@     # restart
journalctl -u @@service@@ -n 50   # process log

Several shops on one server — each has its own service (named after the site address), socket and nginx block; they share only the server's memory and CPU. On a small server use --workers=2.