-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MariaDB: Add option to persistently configure innodb_buffer_pool_size via UI #3754
Comments
I agree but for me increasing to just 512 MiB (as someone in Home Assistant Core mentioned in a guide how to fix the issue). I think it should be globally increased to 512 MiB (or maybe 256 MiB could be enough, I don't know) in a default configuration. Of course a way for tunning these configuration options stored in |
I can confirm this allowed me to upgrade from database version 46 to 47. Thank you! |
Yup, this worked for me too, thanks! |
Worked here too. 30GB Database. |
Looks like it was originally set low to optimise for low RAM machines which is fair: #1436 PS: is there a trick to running
|
Thanks. I was using "Terminal & SSH", now switch to "Advanced SSH & Web Terminal" and disabled protection. And it works. |
Would be a VERY nice option to have!!! |
Agreed, this is hardcoding to Pi acceptable values is a headache on bigger systems with huge DB. Had to do this workaround when upgrading to 2024.8 and then to 2024.9 as well. |
Ohhhhh, frustrating. Are everyone sure that settings will be kept after restarting. I mean docker containers will restart, maybe fine, but when they are updatet it will be overwritten? Maybe it is better to set global vars for the containers and not to edit config files inside the containers? |
It's just a temporal solution, which helps you to upgrade Home Assistant Core to the newest version and do required database migrations. These changes "disappear" after restarting the container (global variable and config file change, too). We wait for adding some permanent option to the addon configuration. It is a reason, why this issue exists (see the first message in this thread). |
I filed a PR, works in my dev environment, but I never contributed to HA before, so not sure when if it will go through. |
The real question is, why is the recommendation to use MariaDB instead of Postgres? (And on HAOS, why isn't Postgres used?) On a 9GB database I've never had any performance issues, even during schema upgrades. Using a DB in Postgres 16, It took roughly 30 seconds for the schema upgrade that other folks have reported is taking hours under MySQL or MariaDB. |
Hmm, interesting. What HW do you running your Home Assistant instance on? It looks great according to your results. I thought PostgreSQL isn't supported, so I use MariaDB and has issues with last migrations, as you mentioned. I've dedicated Hardkernel Odroid M1 for Home Assistant Operating system with NVMe SSD as data storage. Previously I used shared (there were other services running along the supervisor version of Home Assistant) Raspberry Pi 4B 4 with GB of RAM and had pretty bad experience with performance. Now, it works well but DB migrations (and working with history in frontend) and still not as good as they could be. |
The question is also: why does it fail in reality. |
The Buffer was at 128MByte. To less for so much data (32GByte). Took over 10 hours. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Do you have any news on getting this merged? |
Describe the issue you are experiencing
After upgrading to 2024.9 the DB migration failed. The migration completed successfully after increasing the innodb_buffer_pool_size from 128M to 4G. This change is currently not trivial, as from the CLI a shell needs to be opened inside the corresponding Docker container, the configuration file needs to be found and editied using vi and MariaDB needs to be restarted. Moreover, such a change is currently not persistent and is likely to be due also for the next migration.
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
Which add-on are you reporting an issue with?
MariaDB
What is the version of the add-on?
2.7.1
Steps to reproduce the issue
pure_keep_days=366
(1206, 'The total number of locks exceeds the lock table size')
change
innodb_buffer_pool_size=128M
toinnodb_buffer_pool_size=4G
System Health information
System Information
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Dashboards
Recorder
Solcast PV Forecast
Anything in the Supervisor logs that might be useful for us?
No response
Anything in the add-on logs that might be useful for us?
No response
Additional information
configuration.yaml:
The text was updated successfully, but these errors were encountered: