[MCOL-423] Issues with the I_S tables Created: 2016-11-28  Updated: 2016-12-07  Resolved: 2016-12-07

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.6

Type: Bug Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2016-23, 2016-24

 Description   

After some testing today the following was found:

  • The usage of I_S tables breaks calpontsys tables
  • The usage of I_S columns gets a too many open files error
  • I_S tables spawns thousands of threads and is very slow when there are many tables
  • After calling total_usage(), compression_ratio() returns NULL

My guess is we aren't closing files for compressed size scan properly.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2016-11-28 ]

Also:

  • compression ratio calculation is very wrong (stupid mistake)
  • there appears to be a memory leak
Comment by Andrew Hutchings (Inactive) [ 2016-11-29 ]

All the issues were down to FD and RAM leaks when using I_S.COLUMNSTORE_FILES which the pull request fixes.

Also fixed my stupid mistake in calculating compression ratios.

This bug only affects develop, no released versions.

Comment by Daniel Lee (Inactive) [ 2016-12-06 ]

Build tested: Source from Github

[root@localhost columnstore]# cd mariadb-columnstore-server/
[root@localhost mariadb-columnstore-server]# git show
commit 8592d353c5477940f9600566639302de9fa994c7
Merge: 3795bd4 7af4e57
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 09:49:03 2016 -0600

Merge pull request #20 from mariadb-corporation/MCOL-441

MCOL-441 Fix segfault on SP error

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit d4a601b4fbc81a5929ed5b36890e70514b96803a
Merge: cb8ffed fe381ab
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 12:26:09 2016 -0600

Merge pull request #68 from mariadb-corporation/MCOL-442

MCOL-442 Allow default zero date/datetime

Repeatedly queried from the columnstore_info schema and did not notice memory utilization keep going up.

Also test compression radio using compressed and non-compressed tables, as well as a mix of the two.

I did notice on issue with total_usage() and here is how I reproduced it.

Environment used: 1 vm with 4gb memory and 1 cpu core (Not sure if this makes a difference)

I started having a 1gt tpch1c database and another database with just the 1gb orders table. I dropped both databases and called total_usage(). The called did not return and mysqld was cranking at 99% cpu.
MariaDB [columnstore_info]> call total_usage();
---------------------------------+

TOTAL_DATA_SIZE TOTAL_DISK_USAGE

---------------------------------+

4.78 GB 2.84 GB

---------------------------------+
1 row in set (0.09 sec)

Query OK, 0 rows affected (0.09 sec)

MariaDB [columnstore_info]> call table_usage(NULL);
-----------------------------------------------------------------

TABLE_SCHEMA TABLE_NAME DATA_DISK_USAGE DICT_DISK_USAGE TOTAL_USAGE

-----------------------------------------------------------------

mytest orders 392.07 MB 194.02 MB 586.09 MB
tpch1c customer 14.06 MB 258.04 MB 272.10 MB
tpch1c lineitem 720.12 MB 196.02 MB 916.15 MB
tpch1c nation 6.03 MB 4.02 MB 10.05 MB
tpch1c orders 392.07 MB 194.02 MB 586.09 MB
tpch1c part 16.07 MB 136.05 MB 152.12 MB
tpch1c partsupp 224.04 MB 128.02 MB 352.05 MB
tpch1c region 5.02 MB 4.02 MB 9.05 MB
tpch1c supplier 12.05 MB 8.03 MB 20.09 MB

-----------------------------------------------------------------
9 rows in set (0.18 sec)

Query OK, 0 rows affected (0.18 sec)

MariaDB [columnstore_info]> drop database tpch1c;
Query OK, 8 rows affected (0.78 sec)

MariaDB [columnstore_info]> drop database mytest;
Query OK, 1 row affected (0.15 sec)

MariaDB [columnstore_info]> call total_usage();

The last call did not return.

From another terminal:

top - 20:51:14 up 2:30, 2 users, load average: 1.37, 1.06, 0.55
Tasks: 106 total, 2 running, 104 sleeping, 0 stopped, 0 zombie
%Cpu(s): 96.9 us, 3.1 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 3882496 total, 1924016 free, 395912 used, 1562568 buff/cache
KiB Swap: 1572860 total, 1572088 free, 772 used. 3206396 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8860 mysql 20 0 1903084 186408 21000 S 99.0 4.8 7:34.09 mysqld
21768 root 20 0 0 0 0 S 0.3 0.0 0:02.08 kworker/0:1
1 root 20 0 44512 6876 2256 S 0.0 0.2 0:00.92 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.04 kthreadd

Comment by Daniel Lee (Inactive) [ 2016-12-07 ]

Build verified: Github source
[root@localhost mariadb-columnstore-server]# git show
commit 8592d353c5477940f9600566639302de9fa994c7
Merge: 3795bd4 7af4e57
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 09:49:03 2016 -0600
Merge pull request #20 from mariadb-corporation/MCOL-441
MCOL-441 Fix segfault on SP error
[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 7a8322dc28471b830aca243698cd7fce5bc4401c
Merge: 5c0ced8 9b6beb4
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Wed Dec 7 10:10:22 2016 -0600
Merge pull request #73 from mariadb-corporation/MCOL-435
Mcol 435

Per MCOL-406, there is a design change for table_usage(), which takes two parameters instead of one. Verified along with MCOL-406.

Generated at Thu Feb 08 02:20:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.