Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
hello
i used to have all tables on ibdata1 before, then i switched to one file per table, but the ibdata1 file keep its size.
I recently switched to mariadb 10.1, and hoped that the defragmenting function would help to shrink the file, but it didn't worked.
I optimised all tables, but the ibdata1 file did not changed at all, it is still 197gb
MariaDB [(none)]> show status like '%defragment%';
|
+----------------------------------------+--------+
|
| Variable_name | Value |
|
+----------------------------------------+--------+
|
| Innodb_defragment_compression_failures | 0 |
|
| Innodb_defragment_failures | 32872 |
|
| Innodb_defragment_count | 113744 |
|
+----------------------------------------+--------+
|
3 rows in set (0.01 sec)
|
MariaDB [(none)]> show variables like '%defragment%';
|
+--------------------------------------+----------+
|
| Variable_name | Value |
|
+--------------------------------------+----------+
|
| innodb_defragment | ON |
|
| innodb_defragment_fill_factor | 0.900000 |
|
| innodb_defragment_fill_factor_n_recs | 20 |
|
| innodb_defragment_frequency | 40 |
|
| innodb_defragment_n_pages | 7 |
|
| innodb_defragment_stats_accuracy | 0 |
|
+--------------------------------------+----------+
|
Attachments
Issue Links
- blocks
-
MDEV-28699 Shrink temporary tablespaces without restart
-
- Closed
-
-
MDEV-32452 InnoDB system tablespace is not shrunk on slow shutdown
-
- Closed
-
- causes
-
MDEV-34216 Possible corruption when shrinking the system tablespace on innodb_fast_shutdown=0
-
- Closed
-
- is blocked by
-
MDEV-31373 innodb_undo_log_truncate=ON recovery results in a corrupted undo log
-
- Closed
-
- is duplicated by
-
MDEV-31462 ibdata1 shrinking
-
- Closed
-
- relates to
-
MDEV-19229 Allow innodb_undo_tablespaces to be changed after database creation
-
- Closed
-
-
MDEV-28699 Shrink temporary tablespaces without restart
-
- Closed
-
-
MDEV-29983 Deprecate innodb_file_per_table
-
- Closed
-
-
MDEV-29999 innodb_undo_log_truncate=ON is not crash safe
-
- Closed
-
-
MDEV-33112 innodb_undo_log_truncate=ON is blocking page writes
-
- Closed
-
-
MDEV-35398 Improve shrinking of system tablespace
-
- Closed
-
-
MDEV-35689 InnoDB system tables cannot be optimized or defragmented
-
- Stalled
-
-
MDEV-21952 ibdata1 file size growing in MariaDB
-
- Closed
-
-
MDEV-29986 Set innodb_undo_tablespaces=3 by default
-
- Closed
-
-
MDEV-32622 [mariadb-galera] The undo log is very large, how can there be fewer undo log logs
-
- Closed
-
-
MDEV-34529 Shrink the system tablespace when system tablespace contains MDEV-30671 leaked undo pages
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
hello
i used to have all tables on ibdata1 before, then i switched to one file per table, but the ibdata1 file keep its size. I recently switched to mariadb 10.1, and hoped that the defragmenting function would help to shrink the file, but it didn't worked. I optimised all tables, but the ibdata1 file did not changed at all, it is still 197gb MariaDB [(none)]> show status like '%defragment%'; +----------------------------------------+--------+ | Variable_name | Value | +----------------------------------------+--------+ | Innodb_defragment_compression_failures | 0 | | Innodb_defragment_failures | 32872 | | Innodb_defragment_count | 113744 | +----------------------------------------+--------+ 3 rows in set (0.01 sec) MariaDB [(none)]> show variables like '%defragment%'; +--------------------------------------+----------+ | Variable_name | Value | +--------------------------------------+----------+ | innodb_defragment | ON | | innodb_defragment_fill_factor | 0.900000 | | innodb_defragment_fill_factor_n_recs | 20 | | innodb_defragment_frequency | 40 | | innodb_defragment_n_pages | 7 | | innodb_defragment_stats_accuracy | 0 | +--------------------------------------+----------+ |
hello
i used to have all tables on ibdata1 before, then i switched to one file per table, but the ibdata1 file keep its size. I recently switched to mariadb 10.1, and hoped that the defragmenting function would help to shrink the file, but it didn't worked. I optimised all tables, but the ibdata1 file did not changed at all, it is still 197gb {noformat} MariaDB [(none)]> show status like '%defragment%'; +----------------------------------------+--------+ | Variable_name | Value | +----------------------------------------+--------+ | Innodb_defragment_compression_failures | 0 | | Innodb_defragment_failures | 32872 | | Innodb_defragment_count | 113744 | +----------------------------------------+--------+ 3 rows in set (0.01 sec) {noformat} {noformat} MariaDB [(none)]> show variables like '%defragment%'; +--------------------------------------+----------+ | Variable_name | Value | +--------------------------------------+----------+ | innodb_defragment | ON | | innodb_defragment_fill_factor | 0.900000 | | innodb_defragment_fill_factor_n_recs | 20 | | innodb_defragment_frequency | 40 | | innodb_defragment_n_pages | 7 | | innodb_defragment_stats_accuracy | 0 | +--------------------------------------+----------+ {noformat} |
Component/s | Documentation [ 10903 ] | |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Jan Lindström [ jplindst ] |
Assignee | Jan Lindström [ jplindst ] | Ian Gilfillan [ greenman ] |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link | This issue causes MENT-1304 [ MENT-1304 ] |
Workflow | MariaDB v3 [ 84632 ] | MariaDB v4 [ 153459 ] |
Link |
This issue relates to |
Assignee | Ian Gilfillan [ greenman ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Link | This issue blocks MENT-1304 [ MENT-1304 ] |
Fix Version/s | 10.12 [ 28320 ] | |
Fix Version/s | N/A [ 14700 ] | |
Summary | Defragmenting does not shrink ibdata1 | InnoDB system tablespace cannot be shrunk |
Link | This issue causes MENT-1304 [ MENT-1304 ] |
Link |
This issue relates to |
Link |
This issue blocks |
Link |
This issue relates to |
Priority | Major [ 3 ] | Critical [ 2 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue blocks |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Link |
This issue blocks |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Priority | Blocker [ 1 ] | Critical [ 2 ] |
Priority | Critical [ 2 ] | Blocker [ 1 ] |
Priority | Blocker [ 1 ] | Critical [ 2 ] |
Environment | debian 9 | |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Fix Version/s | 11.0 [ 28320 ] |
Fix Version/s | 11.2 [ 28603 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link |
This issue is blocked by |
Status | Stalled [ 10000 ] | In Testing [ 10301 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Matthias Leich [ mleich ] |
Assignee | Matthias Leich [ mleich ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
Link |
This issue is duplicated by |
Labels | Preview_11.2 |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Comment |
[ {noformat}
origin/bb-11.2- behaved relative well in RQG testing. I observed many bad effects but they occured/occur in preview-11.2, 11.2 b8c039fad16adf9cbc6dac2e34cdeb772b9065a0 2023-07-07T09:05:33+10:00 and sometimes other trees too. The main testing campaign consisted of ~ 9900 tests which all used the server startup option "--mysqld=--innodb_data_file_path=ibdata1:1M:autoextend:autoshrink". Statistics from the remaining test results: smallest system tablespace ever shrinked 1024 pages biggest system tablespace ever shrinked 41152 pages biggest shrink operation ~ 16000 pages truncated smallest shrink operation ~ 250 pages truncated {noformat} ] |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan Balathandayuthapani [ thiru ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 11.2.1 [ 29034 ] | |
Fix Version/s | 11.2 [ 28603 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue blocks |
Link | This issue is duplicated by MENT-1304 [ MENT-1304 ] |
Link |
This issue relates to |
Link | This issue blocks MENT-1304 [ MENT-1304 ] |
Link |
This issue relates to |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36724 ] |
Remote Link | This issue links to "Page (MariaDB Confluence)" [ 36724 ] |
Link |
This issue causes |
Zendesk Related Tickets | 113383 |
Link | This issue blocks MENT-1304 [ MENT-1304 ] |
Link |
This issue relates to |
Link | This issue relates to MDEV-34908 [ MDEV-34908 ] |
Link |
This issue relates to |
Link | This issue relates to MDEV-35689 [ MDEV-35689 ] |
I don't think it has ever been claimed that the ibdata1 would shrink as the result of defragmentation; but I find that our current documentation is not at all straightforward in regard to this question, so I'm assigning it to jplindst to clarify, especially in the KB.