article --summary
The summary
The post explains why every Laravel queue worker and Horizon supervisor ends up holding a separate compiled copy of the application in memory. Because those copies multiply with each worker, the cost becomes significant on smaller servers.
To address this, the author introduces queue-prefork, a package that shares opcache across forked worker processes. According to the post, this sharply reduces memory use while leaving job throughput unchanged.
Editorial note: This is a summary of an article first published by freek.dev. The full piece is on their site.