Uh oh!
There was an error while loading. Please reload this page.
Add MariaDB 10.6 support (drop row_format=compressed) - #30129
Conversation
Keeping MariaDB 10.4 too as both versions have some BC breaks, so tests will run on both (for now).
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Should be good now, but regarding e49233a should the conversion just be dropped (as on the commit) or should we convert actual COMPRESSED tables to DYNAMIC? 🤔 |
We can also recommend (documentation only) to use https://mariadb.com/kb/en/innodb-page-compression/#configuring-the-innodb-page-compression-algorithm for newly created tables as recommended by MariaDB : https://mariadb.com/kb/en/innodb-page-compression/#comparison-with-the-compressed-row-format https://mariadb.com/kb/en/innodb-system-variables/#innodb_compression_algorithm |
obel1x
commented
Dec 8, 2021
there are two different points:
imo for 1. they should be converted as soon as possible. i personally would like to get hints if my db is not configured for best nextcloud- performance e.g. by stating, that the "global innodb_compression_default" has not been set up best. this should be a hint, not a must. maybe before converting all tables so that the converted tables are best running after conversion. If the db-admin chooses not to do so, its up to him. for the 2nd i than would not do any coding concerning row_format if not really needed as there may be reasons for doing it in a different way. @acsfer the line had been removed and after that replaced by dnamic setting? why have you done so? is there a need for this? |
Points at #30129 (comment) are purely documentation related (as any other "tuning related" settings). |
obel1x
commented
Dec 9, 2021
If thats the reason, please remove it. It is only a source for errors in the future and redundant with db-settings.
Thats fine, there are morer important issues |
Did anyone actually test how well a common Nextcloud database compresses on a common filesystem, let's say On the other hand, the size of the |
Nuadh
commented
Dec 14, 2021
My nextcloud db is 340MB, but takes only 91MB on a lz4 compressed ZFS filesystem. It's a small instance, but it shows the effect of compressing. I would guess you could get fairly similar results with row_format=compressed. It is not worth enforcing, but is a tuning-tip worth mentioning |
MichaIng
commented
Dec 14, 2021
Jep, should be similar with MariaDB internal compression then, even better with Through with factor 4 for InnoDB cache size this is a pretty major factor. Usually the database server consumes most RAM of the whole stack (at least in all cases I've seen with different webservers and PHP-FPM), and the InnoDB cache size again is most responsible for MariaDB RAM usage. Not much point in ~doubling RAM for a server only to disable database compression for a theoretical query speedup 😄. However, not enforcing it then has exactly this benefit that admins can choose freely whether and which compression format (or is that already possible?) and on which level they want to do it, like in your case native filesystem compression instead. Btw, how did you actually achieve this when, as I understand, |
Nuadh
commented
Dec 14, 2021
That was my bad.. I "manually" changed it ages ago, but didn't check.. The updater seems to force it to compressed. Double compression is twice as good, no? I now changed it back to DYNAMIC, and the on disk usage is 77MB, actual size is 290MB. |
MichaIng
commented
Dec 14, 2021
How dumb questions can solve problem unexpectedly 😄. Moreless same compression ratio is quite surprising in case of |
Nuadh
commented
Dec 14, 2021
as Innodb_num_pages_page_compressed is 0, and innodb_compression_default is OFF, I think I'm fine, until the NC updater makes it compressed again:) InnoDB has moved to page compression instead of row compression in MariaDB 10.6. I added innodb_compression_default = OFF in my server config, to avoid sudden changes in that default^^ |
Guys, is it possible to discuss the PR here only, and move further discussions to the forum? Thanks for understanding. 😉 |
@obel1x |
MichaIng
commented
Jan 18, 2022
MariaDB v10.6 is hitting more and more repositories, v10.7 in RC state. It would be great to have this merged with NC24, so I'm giving this hereby a push for another review 🙂. |
skjnldsv
commented
Jan 19, 2022
Please update other pipelines if possible and update the documentation :) |
Nascire
commented
Jan 19, 2022
Out of curiousity - this change only affects new installations it seems? What about existing installations with COMPRESS format? |
nickvergessen
commented
Jan 19, 2022
Before updating to 10.6 you need put Nextcloud in maintenance mode, revert the compress and then update |
Nascire
commented
Jan 19, 2022
I managed to change them myself - but I think most people out there would appreciate an official way ... |
nickvergessen
commented
Jan 19, 2022
Right, we could make |
I thought the same, though not sure whether this could take too long, so that it is better to show a notice in the admin panel instead, like for adding missing table indices and such? Would then require a related CLI command. EDIT: Ah wait, this is done at line 81 already: https://github.com/nextcloud/server/blob/e49233a/lib/private/Repair/Collation.php#L81 EDIT2: Since this function only loops through non-UTF8 tables, a dedicated repair step/CLI command could do the |
MichaIng
commented
Jan 22, 2022
Since MariaDB 10.6 was just merged to Debian Bookworm/testing, I converted my tables manually and can verify that all is working well after upgrading MariaDB 🙂: foriin$(mysql -e 'show tables from nextcloud;'| tail -n +2)do
mysql -e "alter table nextcloud.$i ROW_FORMAT=DYNAMIC;"done |
obel1x
commented
Feb 17, 2022
What is needed to get the Changes backported into NC 23 as 24 is not determined so that 23 will be the stable one for some time? |
MariaDB no longer plans to drop support for From the maintainer of the feature:
|
Keeping MariaDB 10.4 too as both versions have some BC breaks, so tests will run on both (for now).