[MDEV-9079] Aria very slow for internal temporary tables Created: 2015-11-04 Updated: 2018-02-17 Resolved: 2018-02-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Aria |
| Affects Version/s: | 10.1.8 |
| Fix Version/s: | 10.1.32, 10.2.14, 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Slawomir Pryczek | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Environment: |
VMWare 4Core/8GBRam Guest |
||
| Issue Links: |
|
||||||||||||
| Sprint: | 10.1.30, 5.5.59, 10.0.34 | ||||||||||||
| Description |
|
Hi Guys, But in some queries i see that 90% of time is wasted copying to temp tables. This is initial benchmark: Now there could be some errors in documentation, as far as i understand, increasing aria_pagecache_buffer_size should result in no disk writes, but it doesn't make any difference. So i played with configuration a little, it seems that increasing The problem is that out of the box, with "default" heap / tmp table settings mysql 5.7 is much faster 5-6s instead of 8-9s (mariadb 10.1.8). I compiled the server from sources disabling ARIA as TMP engine, and it resulted in run times close to 4-5s. So it was faster than mysql. After changing tmp table settings as above it went to 3s. Out of the box: 8s So im filling it as major bug as having maria as default storage angine for TMP tables seem to degrade performance a lot. Honestly i wasn't able to find queries where it'll improve things. In DOC it says that table scans are faster over myisam than aria. Is there a reason to keep it as default engine and removing ability to set it in server config without compiling from sources? This is max what i got from internal TMP tables using myisam: This is aria, after optimization, changing page size, etc.: In docs it says that doing full table scans it's slower for PAGE (which seems true). Maybe it'd be good to have more control over it, eg. maybe using ROW_FORMAT=Dynamic for all internal aria temporary tables would make aria on par with myisam for internal tmp tables? Maybe just queries im doing don't play nicely with aria, any suggestions? It seems that not being able to fully control how internal tmp tables behave is having big performance impact. Thanks. |
| Comments |
| Comment by Axel Schwenke [ 2017-12-19 ] |
|
Added a test case for ARIA writes to the regression test suite. |
| Comment by Dimitris Chatzis [ 2018-01-04 ] |
|
After two years MariaDB start checking an easy to reproduce problem and it seems that it will take 2 more years for a fix |
| Comment by Michael Widenius [ 2018-02-17 ] |
|
Fixed performance problem with Aria by speeding up find_head(). The result of this patch is a up to 2x or more speed up for inserts without keys for |