My Horizon was eating 1.2 GB of RAM. Now it's ~280 MB. Same app, same jobs π€―
I gave it the PHP-FPM trick: fork every worker from one template that owns a shared opcache. Now my workers share one compiled copy.
π₯ Individual worker: ~56 MB β ~7.4 MB
π₯ Laravel Cloud 2 GB box: 27 workers β 210
π₯ 128 workers: ~7 GB β ~1 GB π³
One composer require, zero config. Linux, Laravel 11β13, MIT π
https://github.com/tevkert/queue-prefork
GitHubGitHub - tevkert/queue-prefork: Cut the memory of Laravel queue workers by up to 80 %: queue:work and Horizon workers fork from one template that shares compiled code. Drop-in, no code changes.Cut the memory of Laravel queue workers by up to 80 %: queue:work and Horizon workers fork from one template that shares compiled code. Drop-in, no code changes. - tevkert/queue-prefork
commit ad8c9e1