Open renecannao opened 1 month ago
In our experience, a query with a large result set being run on a compressed connection affected the performance of ProxySQL in general, not just for that query. We saw a general drop in throughput for the whole ProxySQL server (shown by an increase in backend connections in use) which makes it a more serious bug than if it only affected performance for that one query.
@renecannao
Sorry to post here but there is a similar problem that makes the queries slow if you set mysql-threshold_resultset_size
to a value of 536870912
and greater.
@MichalisDBA : it is unlikely related. But we will try to look into it as soon as we finalize some high priority deadlines
What is the expected ETA for a fix? Or do you recommend disabling compression if you have this currently enabled?
@ThomasVerhoeven1998 : this issue was observed with an exceptional large resultset, and probably shouldn't be noticeable with smaller resultset.
If you are affected, right now the only solution is to completely disable compression, setting mysql-have_compress=false
We encountered this issue and turning off compression like Rene suggested mitigated the issue.
@dankow : I missed your comment, sorry. Indeed, what you are saying makes perfectly sense. When a worker thread is busy compressing (that means using a lot of CPU resources) it can't serve other connections: a portion of the traffic is affected. If compression is used by multiple connections and multiple/all worker threads are busy compressing, then all the traffic is affected.
BTW, @yashwantsahu20 is already working on this.
There is a severe performance degradation when clients connect to ProxySQL using compression.
Some example with this query:
Direct connection without compression:
Direct connection with compression:
Using ProxySQL without compression:
Using ProxySQL with compression:
It seems that compression is a big performance penalty for both MySQL and ProxySQL , but it seems that ProxySQL is twice as slow than MySQL.
ProxySQL uses
compress()
instead of lower level zlib functions, and this usesZ_DEFAULT_COMPRESSION
that is 6 (on a scale from 1 to 9). So I guess it is "just" a matter of compression level.