[MXS-1412] Performance issue with MaxRows filter Created: 2017-09-13 Updated: 2020-08-25 Resolved: 2017-09-14 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | maxrows |
| Affects Version/s: | 2.1.7 |
| Fix Version/s: | 2.1.8 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Valerii Kravchuk | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
There is a performance issue with the MaxRows filter. When simple SELECT * FROM table (where there are millions of rows) is executed to see if the filter would trigger correctly and provide a different error in the log, 1 of 4 cpu cores on the server hit 100% and stayed there. 100% on a core for a single query seems like a lot. When the same query is executed without the MaxRows filter enabled, cpu usage is negligible. Furthermore, while the core was at 100% like this, queries hitting the backend were taking several seconds to complete, stuck in a state of 'writing to net' and the user was labeled as 'unauthenticated user'. These same queries run in microseconds any other time. As this happened on a server with 4 cores and threads=4 in the configuration file, it is expected to have all other queries routed mostly to the 3 idle cores. Either MaxScale was not routing them to the 3 idle cores, or there is a bottleneck somewhere else. Relevant part of configuration file is:
This may be related/similar to https://jira.mariadb.org/browse/MXS-1212 |
| Comments |
| Comment by markus makela [ 2017-09-14 ] |
|
The packet calculation iterated over all captured packets instead of looking at only the new packets. This caused excessive execution times which are now fixed. |