[MCOL-563] Implement Disk-based aggregation Created: 2017-02-10 Updated: 2021-06-29 Resolved: 2021-06-08 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | ExeMgr, writeengine |
| Affects Version/s: | None |
| Fix Version/s: | 5.6.1 |
| Type: | New Feature | Priority: | Blocker |
| Reporter: | mathieu raillard | Assignee: | David Hall (Inactive) |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Sub-Tasks: |
|
||||||||||||||||||||||||||||||||
| Epic Link: | Tech debt | ||||||||||||||||||||||||||||||||
| Sprint: | 2020-8, 2021-1, 2021-2, 2021-3, 2021-4, 2021-5, 2021-6, 2021-7, 2021-8 | ||||||||||||||||||||||||||||||||
| Description |
|
Hi, I read in the knowledge base that Disk-based aggregation are not implemented. Have you some ETA/Roadmap on this feature or is it out of the scope? It could be quite helpfull to avoid the process to be killed when he asks for too much memory on aggregations, especially since it's working for joins. https://mariadb.com/kb/en/mariadb/columnstore-disk-based-joins/ Regards Mathieu |
| Comments |
| Comment by Daniel Lee (Inactive) [ 2021-04-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 ( Drone #2273 ) VM memory=16gb 1. Reproduced issue
2. Functional test
3. Performance comparison
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-04-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Another test run 5.6.1-1 disk run (right after cpimport)
cached run (2nd run)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fixed typos and added additional info for clarification. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
With disk-base aggregation disabled and TotalUmMemory set to 50M, The test in my last comment failed with the aggregation error. With disk-base aggregation disabled and TotalUmMemory set to back to the default value of 25%, I got the follow timing: disk run (hot) = 57.488 seconds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Concurrentcy test: disk-base aggregation enabled. This test is to verify temp files are not overwriting each other and affecting final test results. Execute the same test queries in three concurrency sessions and got identical results. Repeated the same concurrency test many times and got matching results. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Performance comparison when there is enough memory to run the query in-memory. 25% toalummemory Disk-based aggr enabled Disk-based aggr disabled | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I ran the same performance test that Daniel did against the same table:
The following tests were run with a debug build with 25% totalummemory and cached data. The aggregation is expected to fit into memory. With disk aggregation off
With disk aggregation on
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build test: 5.6.1 ( Drone #2319 ) I executed the same lineitem test for the following: TotalUMMemory: 50M The query returned the following error: ERROR 1815 (HY000) at line 1: Internal error: TupleAggregateStep::doThreadedAggregate() IDB-2056: There was an IO error during a disk-based aggregation. I repeated the test few times, and got the same error. alexey.antipovskyPlease run a test on you system using the same build to see if this also hapens to you. Thanks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.6.1-1 ( Drone #2338 ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-05-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There are additional improvements waiting for unit test. When this PR is ready we'll get it back to testing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-25 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 (Drone #2434) VM memory: 4GB 1. Execute time is about 8.5% faster than previous build for disk run
3. Max tmp file utilization is way down, 1.3gb compared to 31gb used by previous build
5. What is the actual location of the aggr temp files? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-05-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Default temp space is /var/lib/columnstore/disk-based-aggr-tmpdir. The line in the XML is commented as a placeholder if you wish to change the tempdir. I have to do that because my /var/lib disk is tiny and I need to move it to a larger disk. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 (Drone #2452) The consistency issue for aggregation tmp directory in Columnstore.xml has been corrected. <!-- <TempDir>/var/lib/columnstore/disk-based-aggr-tmpdir</TempDir> --> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Todd Stoffel (Inactive) [ 2021-05-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Let's simplify the tmpdir path. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Hall (Inactive) [ 2021-05-27 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Just for fun, let me note that the entry On Thu, May 27, 2021 at 11:13 AM Gregory Dorman (Jira) <jira@mariadb.org> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-05-28 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 ( Drone #2466) /tmp/columnstore_tmp_files/aggregates is not used as the tmp directory for aggregation. But this directory is no longer in the Columnstore.xml file as the default tmp directory. Can user still modify the Columnstore.xml file to relocate the tmp directory? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-06-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build tested: 5.6.1 Engine: Drone #2503, CMAPI: Drone #490 VM memory: 16gb Test #1 TotalUmMemory: 25% Tests performed as expected Test #2 Tests performed as expected. Disk-based aggregation was not used since there is enough memory to perform in-memory aggregation Test #3 Disk-based aggregation was used as expected. After installation and data loading, my first test hit the following error. I repeated the test 9 more times and all worked fine. I restarted ColumnStore and tried it again. That also worked. I also truncated and loaded the lineitem table. The test also worked 5 times in a row. I don't know what triggered the first failure.
err.log | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-06-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.6.1 ( Drone #2524) Verified that the first disk-based aggregate queries no longer reporting the missing file error. The query works now. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-06-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.6.1 ( Drone #2537) Verified with this latest build | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Lee (Inactive) [ 2021-06-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Build verified: 5.6.1 ( Drone #2551) Reproduced the issue with build 2537 using info from the Google Drive link above and verified the fix in build #2551. Both queries did use the tmp directory for aggregation temp files. I used the temp directory for a very short time and the customer may not have caught it in time. |