-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
zlib affects queries performance #42
Comments
Probably a good point - usually you're anyway having the mysql server on the same machine or having a very high bandwidth to it, making CPU and not bandwidth the bottleneck... |
@bwoebi I have take a look on compression/uncompression implementation and have following question. Have you considered possibility to use Stream Compression Filters instead of zlib_encode/zlib_decode? I just saw such approach in https://github.com/clue/php-zlib-react |
It is not possible to reliably attach buffering stream filters to a non-blocking stream. Thus: no. |
@bwoebi I have disabled compression and now the most time is spent on protocol parsing. Hoply when PHP JIT will be released it will perform much better. |
Yes, protocol parsing is the most CPU intensive part of this. Something like a JIT will probably indeed bring quite some benefit. I'll look at disabling zlib compression by default. |
After some benchmarking I have figure out that zlib compresion affects query performance a lot.
w/ zlib:
w/o zlib:
Probably it must not be enabled by default when zlib is available.
Benchmark source: https://github.com/torinaki/mysql/blob/benchmarks/benchmarks/QueryBench.php
The text was updated successfully, but these errors were encountered: