[MXS-1212] Excessive execution time when maxrows limit has been reached Created: 2017-03-29 Updated: 2017-04-19 Resolved: 2017-04-19 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | maxrows |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Johan Wikman | Assignee: | Massimiliano Pinto (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
"I also tested the max_resultset_size option. This worked, but I noticed a significant increase in query execution time when the size was exceeded. With the filter off, the query executed in less and 1 second. With the filter in place, I got a resultset of 0 records after 23 seconds." |
| Comments |
| Comment by Darin [ 2017-03-30 ] |
|
Note in the description, I had this issue ONLY when exceeding the max_resultset_size parameter. Not when exceeding the maxrows parameter. |
| Comment by Massimiliano Pinto (Inactive) [ 2017-03-31 ] |
|
MaxScale configuration: [MaxRows] [Read-Only-Service] MySQL client to maxscale: mysql -h 127.0.0.1 -P 8806 -umassi -pmassi MySQL [(none)]> select repeat('a', 1000000); Messages in the log file: I see the empty result set comes immediately. Would you mind adding MaxScale configuration and a SQL example that takes that long time, 23 seconds? |
| Comment by Darin [ 2017-03-31 ] |
|
I have a table with 12 columns and 66k rows. When I execute select * from table with the filters=MaxRows line commented out under the [Splitter Service] the entire query is returned in about 5s. |
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-02 ] |
|
Hi Darin, thanks for the update. As long as you are able to reproduce the 23s execution time I would like ask you to add in maxscale.cfnf [maxscale] [MaxRows] then you could connect to MaxScale using a mysql/mariadb client: MySQL [(none)]> select repeat('a', 50000) from test.t4 limit 10; Please report the content of maxscale.log: this is as an example from my setup, using that configuration: _2017-04-02 18:08:26 info : [readconnroute] Routed [COM_QUERY] to 'server1': select repeat('a', 50000) from test.t4 limit 10 This way the MaxScale log could tell us something more. Thanks. Massimiliano |
| Comment by Darin [ 2017-04-06 ] |
|
Log and cnf attached. 2017-04-06 18:36:22 notice : [maxrows] Maxrows filter is sending data. I'm also surprised the log says the result set exceeded rows when I have the rows limited commented out. |
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-07 ] |
|
Fixed usage of gwbuf_length: partial buffer only, not the whole buffer. This lowers CU usage when receiving 30.000 and more rows + csdata->res.length += gwbuf_length(data);
|
| Comment by Massimiliano Pinto (Inactive) [ 2017-04-07 ] |
|
Code pushed to 2.1 branch:
This reduces CPU usage and decreases the response time for result sets https://github.com/mariadb-corporation/MaxScale/commit/f4a5134a83a79dd45a07cb75edfb1777773c049f |