Closed jcheron closed 4 years ago
Merged
There is a performance issue since version 1.0.4 It's 6 times slower (with techempower benchmarks) Maybe a problem with the session: I made its start conditional.
Hi @jcheron,
I have included your PR in the release 1.0.7 and benchmarked it using AB. I have not seen performance issues that you've reported.
Some areas that might need your attention:
Make sure you have numWorkers equal to 10 or other value in your .rr.yml. If it's set to 1 for debug purposes, you will have just one worker that will result in significant performance degradation.
Make sure you have no XDEBUG environment variable or just uset it before starting rr. Otherwise, XDEBUG might affect performance.
It's resolved, it was indeed the session.
However, the prepareSession
method called at each request is too time-consuming.
It might be better to create a session specific class for RoadRunner inheriting from AbstractSession.
You will then be able to pass an instance of this class at server startup with Startup->setSessionInstance($rrSession)
- Make sure you have numWorkers equal to 10 or other value in your .rr.yml. If it's set to 1 for debug purposes, you will have just one worker that will result in significant performance degradation.
For the number of workers, I initialize an environment variable with nproc*2
and I refer to this variable in .rr.yml
http:
workers:
pool:
numWorkers: ${NUM_WORKERS}
maxJobs: 0
- Make sure you have no XDEBUG environment variable or just uset it before starting rr. Otherwise, XDEBUG might affect performance.
I use Docker, so no problems with XDebug.
There is a performance issue since version 1.0.4 It's 6 times slower (with techempower benchmarks) Maybe a problem with the session: I made its start conditional.