Docs

Frequently asked questions

Common questions about running and interpreting BenchKit.

Is this a Laravel package I install?

No. BenchKit is a standalone app you spin up, benchmark with, and then throw away. It never goes near your own codebase.

Do I need Docker?

No. Clone the repo and run it anywhere Laravel runs, including Laravel Cloud. The benchmark tools arrive with composer install. See Running from source.

Can I compare two runs?

Yes. Run it once on each setup and open them side by side to see exactly what your change did.

Do my results survive a rebuild?

Mount a volume at storage/app/runs and they do. Without one, your history lasts as long as the container.

Does closing the tab stop my run?

No. The run belongs to the server rather than to your browser. You can close the tab, reload the page, or open it on your phone and still be watching the same run. Any tab can stop it, and none of them can start a second one.

Can I run two benchmarks at once?

No, and that is deliberate. Two benchmarks competing for the same CPU would each measure the other. BenchKit holds the claim against a live process. If a run is somehow abandoned, the next one starts rather than waiting forever.

How do I benchmark FrankenPHP worker mode?

Pull the FrankenPHP image and start it through Laravel Octane. The same image also runs in classic mode, which is what makes the comparison a fair one. See FrankenPHP.

Can I benchmark against MySQL or Postgres?

Yes. Set the standard Laravel DB_* variables and BenchKit creates the tables it needs on its own. See Adding a real database.

Why does BenchKit say some of my cores were idle?

Under PHP-FPM one request occupies one worker for its whole duration. A pool smaller than your core count leaves cores with nothing to do, and the result understates the machine.

You can see it on the result: the /bench/io curve flattens at your worker count, onto a line drawn from workers ÷ delay. Size the pool from memory rather than cores — a worker is a process holding a copy of your app — and see Common tuning strategies, including a worked example where raising it made things worse.

Can I run the load test from my own machine?

Yes — it is the default. The built-in External load test pairs a second machine with one command when you start the run, runs the standard measurements from it, and records the results into the run. For ad-hoc probing with your own tools, the four load test routes are open endpoints you can point oha at directly. See Testing from another machine for both.

How accurate are these numbers?

They are most accurate when you compare two runs on the same machine, which is what BenchKit is built for. The limits that apply, and what to do about each, are covered in Reading your results.

Where do I get help?