-
Notifications
You must be signed in to change notification settings - Fork 5
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
Comments on your conclusions #3
Comments
@bwoebi I have added comparison to run benchmark with or without enabled OPCache and found that there no difference or results became even worse. Agree that Aerys is more complete solution that simple prototype implemented using NodeJS. It can add additional overhead. I have added new comments about ReactPHP. I can say that ReactPHP perform better and it more lite weight that proves you thoughts. But unfortunately it can't be compared with nodejs, because it doens't support keep-alive yet. Standard deviation is good indicator of server work stability. You can see the probability of the worst performance. Now we can say that only 1% percent of request will be very slow(for some currently unknown reason). Currently I don't have ideas how to profile this case. It will be tricky. Issue about |
@bwoebi I was wrong about OPCache. I have review latest build on Linux environment and can say that we definitely gain benefit of OpCache optimisations.
|
@torinaki The 1% slow requests are probably the ones that need a new connection in case of |
As was mentioned otherwhere, enabling opcache (via
-dopcache.enable_cli=1 -dopcache.optimization_level=0xffffffff
) and using PHP 7.1 may improve performance a bit more.Also, note that the node http module is even simpler than ours; as in, it has no concept of flexible middlewares etc. It ultimately just has to handle even less logic and thus may be faster. A tiny bit of logic, but not totally insignificant as it has to create a bunch of generators for the middleware machinery.
There are also other options to tune for the benchmark, like
"deflateEnable" => false
: Aerys always buffers by default for up toOptions->deflateMinimumLength
to check whether it's worth to use gzip compression]. NodeJS does no such thing.In general, the nodejs server is more lightweight than Aerys; Aerys is packed with a bit more functionality which will be handy in more complex … in real world scenarios.
I have no idea why the standard deviation, especially as it is very low for node... I'd be interested in that too.
P.s.:
$resp->addHeader('Content-Length', strlen($data));
is redundant; Aerys will set it for you (chunked encoding if you stream and normal content-length ifend()
is used without priorstream()
call)The text was updated successfully, but these errors were encountered: