Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Performance example #9

Open
MyDigitalLife opened this issue Aug 23, 2017 · 5 comments
Open

Performance example #9

MyDigitalLife opened this issue Aug 23, 2017 · 5 comments

Comments

@MyDigitalLife
Copy link

In the README.md you point out that the current way of using nginx + php_fpm is flow because of FastCGI. It would be a good idea to have a small section in the readme to show what kind of performance difference this implementation gives you. A simple screenshot of some results compering the same script running with nginx and your new implementation would be good. It would show the need and use of this project very simply.

@ghost
Copy link

ghost commented Aug 24, 2017

wrk not work and ab shows very bad performance (500/s) as far as i know.

@hjr3
Copy link
Owner

hjr3 commented Aug 24, 2017

I plan on doing so. Please keep in mind that I have not done a release yet. I just got ZTS support working correctly. On master, the event loop is helping very little as the PHP execution is blocking the event loop. Also, I did some naive things to get the proof of concept functioning. For example, I buffer the entire response.

Right now I am working on using hyper as the event loop and then sending each request to a Rust futures CPU pool. This would allow hyper to continue streaming requests and responses. At that point I will start profiling, fixing the bottlenecks and posting some performance examples.

@hjr3
Copy link
Owner

hjr3 commented Sep 7, 2017

Update: with #10 I was getting 32k req/s using 4 threads on a GCP instance. This much more in line with what I was expecting. My next steps are to use my packet.net account to get a php fpm and a php rpm benchmark setup and then I will publish the results.

@ghost
Copy link

ghost commented Oct 15, 2017

@hjr3

Much better but still not amazing req/s I got. What did I do wrong?

Just one line.

var_dump($_SERVER);

php-rpm

1 thread:    21.7M   6028
2 threads:   23.7M   4687
4 threads:   29.9M   4436
20 threads:  61.9M   5720
100 threads:  140M   5597

nginx php-fpm

6378

@ghost
Copy link

ghost commented Oct 16, 2017

I have also noticed that $_SERVER lacks key 'REMOTE_ADDR' .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants