[MDEV-9820] global option to enable page compression for all new tables Created: 2016-03-28 Updated: 2017-02-09 Resolved: 2017-02-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.2.3 |
| Type: | Task | Priority: | Major |
| Reporter: | Thomas Maerz | Assignee: | Rasmus Johansson (Inactive) |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | 10.2-rc, compression | ||
| Issue Links: |
|
||||||||
| Description |
|
Page compression is transparent for the client accessing the database, but for most existing applications which create tables by themselves, it is inconvenient to implement compression because you must specify whether each table should be compressed at creation. Since an existing application might not support this function and it may create new tables as it runs, it would not use compression at all. If the application is written in-house or open source, you could modify the source code to enable compression when creating new tables, but for closed source applications which use MariaDB/MySQL, it is impossible. I propose that a global boot variable is created that can be configured in server.cnf to set the default value for all new tables created to compression=1, so that all tables created on the database server can utilize whatever compression the system is configured for. |
| Comments |
| Comment by Sergei Golubchik [ 2016-10-09 ] | ||||||||||||||||||||||||
|
Yes, we could easily add a variable that sets a default value for InnoDB's PAGE_COMPRESSED table attribute. | ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2016-10-23 ] | ||||||||||||||||||||||||
|
What name would you suggest for such an option? innodb_default_page_compression = ON / OFF ? | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2016-10-23 ] | ||||||||||||||||||||||||
|
The name? Either innodb_default_page_compressed or innodb_default_page_compression look good, yes. https://mariadb.com/kb/en/mariadb/engine-defined-new-tablefieldindex-attributes/ | ||||||||||||||||||||||||
| Comment by Alexander Kuleshov [ 2016-11-07 ] | ||||||||||||||||||||||||
|
Hello, Today I've tried to build last 10.2 and getting following error:
After: https://github.com/MariaDB/server/pull/255 PR. | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-01-24 ] | ||||||||||||||||||||||||
|
Do we still need it? | ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2017-01-24 ] | ||||||||||||||||||||||||
|
I do. I'd like this feature on our dump-processing machine to reduce I/O. | ||||||||||||||||||||||||
| Comment by Rasmus Johansson (Inactive) [ 2017-02-06 ] | ||||||||||||||||||||||||
|
Added the innodb_compression_default variable (boolean). https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_compression_default | ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2017-02-07 ] | ||||||||||||||||||||||||
|
| ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2017-02-09 ] | ||||||||||||||||||||||||
|
Does it affect migration from previous versions if I enable compression by default? I got this error ( this is not a production server, no one is fired
Previous version was 10.1.21 with lz4 compression (global default) and compression enabled per table, (all tables in all databases, except mysql of course). | ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2017-02-09 ] | ||||||||||||||||||||||||
|
Uh.. with clean setup, and global lz4 compression mysqld eats all the RAM... and swap | ||||||||||||||||||||||||
| Comment by Igor Pashev [ 2017-02-09 ] | ||||||||||||||||||||||||
|
That's unrelated to the innodb_compression_default option. 10.2.3 just runs out of memory. |