Pinned Tweet
Running Laravel queues with queue:work or Horizon?
Every worker boots your whole app and keeps its own copy of the compiled code in memory. 8 workers, 8 copies.
I made them share one: −70% memory for queue:work, −81% for Horizon. Drop-in, no code changes.
Another real-world Horizon result: 747 MB → 142 MB with the same 3 supervisors and 7 workers.
Each worker went from ~70 MB to ~7 MB, and new workers boot 5x faster.
Thanks for measuring and sharing, Peter 🙌
2
2
38
Love seeing this 🙌 Their workers' server dropped from ~55% memory on average to ~20% after switching to queue-prefork.
2
93
Ando Hakobyan retweeted
Numbers are really good. No issues so far!
Laravel Horizon really needs some love.
teapawt.org/GregoireGaonach/status…
Tip: if you don't trust third-party extensions with your Gmail, ask Claude to build you a dark mode extension for the sites you use.
It goes through each site itself until it looks right. Even the emails in Gmail end up dark.
52
T3 Code hype is so real. Finally moved all my projects from Claude Code, and now even looking at Claude is painful🫣
2
78
Ando Hakobyan retweeted
🔗 Your Laravel queue workers keep 8 copies of your app in memory
dev.to/tevkert/your-laravel-…
#laravel #performance #spatie #memory #queues
Made an image compressor where you set how good the result must look, not a quality setting.
It finds the smallest file that still looks that close to the original, and shows you where the image changed.
Free, no sign-up. PNG, JPG, WebP, AVIF, GIF, HEIC.
picodiet.com
101
Is it just me, or does everyone burn the weekly limit in 6 days and then survive the last day at 99–100%? 😅
1
111
Ando Hakobyan retweeted
queue-prefork: cut Laravel queue worker memory by up to 80%
laravel-news.com/link/19570?…
A Laravel Horizon worker takes ~56 MB.
A Laravel Cloud Flex box has 2 GB.
So it fits about 30 workers, right?
Wrong. It fits 210 with queue-prefork.
The same 210 on stock Horizon needed a Pro 16 GB box: $128/mo instead of $24.
Running Laravel queues with queue:work or Horizon?
Every worker boots your whole app and keeps its own copy of the compiled code in memory. 8 workers, 8 copies.
I made them share one: −70% memory for queue:work, −81% for Horizon. Drop-in, no code changes.
83
It's been running in production on my own apps this week.
One Horizon setup went from 1.16 GB to 282 MB.
1
27
composer require tevkert/queue-prefork
php artisan queue-prefork:doctor # on your server
MIT: github.com/tevkert/queue-pre…
If you try it, reply with your before and after from queue-prefork:status. I'd love numbers from big fleets.
22
Something I measured lately: a Laravel Horizon supervisor takes ~56 MB of RAM, almost as much as a worker (~63 MB), and it never runs a single job.
6 supervisors ≈ 340 MB just to keep your queues organised.
I've been working on that. More soon.
1
168












