-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulse significantly slows down Laravel Octane when using multiple CPU cores #346
Comments
Hi @AlliBalliBaba, Can you please run the following command on the application you are experiencing this on and let us know the output? php artisan tinker --execute="echo config('pulse.ingest.driver')" |
Could you also provide the code within the |
Hey, thanks for the quick answer, The
I think your suspicion is correct that the storage |
I realized that this issue only appears when |
@AlliBalliBaba, I would certainly recommend using the Redis ingest for a performance sensitive configuration, and as you are already using Octane I can only assume that your app is performance sensitive. Changing the APP_ENV is interesting. Do you happen to have Telescope installed, or any other debugging tools that are only active when Pulse doesn't change ingest functionality based on the ![]() |
I found out the blocking is generally an issue with octane or more specifically php streams. Its occurrence after installing Pulse must have been more of a coincidence that was coupled with increased logging overall. I will post feedback here if I find any blocking that comes specifically from Pulse. Right now it seems like Pulse is fully compatible with Octane though :) |
Great to hear. If you do notice any Pulse specific, please let us know. |
Pulse Version
1.0.0-beta15
Laravel Version
11.0.7
PHP Version
8.3.3
Livewire Version
3.4.9
Database Driver & Version
mysql:8.0 Docker Image
Description
When conducting benchmarks with Laravel Octane I noticed that Pulse significantly reduces the number of requests Laravel can handle. This interestingly only occurs when Laravel Octane is running on multiple CPU cores. When running on a single core, the slowdown is negligible.
This could also be an issue with Octane. I opened it here instead since Pulse seems do something that makes workers block each other. It would be beneficial to find out what exactly leads to the blocking. In the worst case Pulse just isn't compatible with Octane.
The raw benchmarks using wrk (fetching a User from mysql and returning it as a JSON, Alpine Docker inside WSL2, Laravel Octane with Swoole, 13th Gen Intel(R) Core(TM) i9-13900H 2.60 GHz):
Benchmarking without Pulse with 1 Worker (1 CPU Core)

Benchmarking with Pulse with 1 Worker (1 CPU Core)

Benchmarking without Pulse with 20 Workers (20 CPU Cores)

Benchmarking with Pulse with 20 Workers (20 CPU Cores)

Basically without Pulse the number of requests increases as the number of CPU increases (as expected)
With Pulse the number of handled requests actually decreases as the number of CPU cores increases
Steps To Reproduce
The text was updated successfully, but these errors were encountered: