MariaDB at 16GB

My history and logbook are very slow. I run HA container and use a separate MariaDB docker container for the recorder. My record config looks like this:

purge_keep_days: 10
db_url: !secret mariadb_url
db_max_retries: 100
db_retry_wait: 20

I can see the database file sizes have grown to what I suspect, and read elsewhere, are ridiculous levels.

I think purge_keep_days was previously 150 days and this may be where the DB size has come from, but I can’t work out now how to reduce the current file sizes.

I’ve tried to manually call the purge service, and also waited a few days for the auto purges, but the database sizes haven’t changed.

Any help would be greatly appreciated!

Hi, I recall shortening the purge time on my db and it did eventually shrink the size accordingly (after a few days). Its strange the manual purge did not work? Do you see anything in the logs?

This won’t help your current situation, but there’s some good tips in this thread on only keeping data you want and excluding the stuff that doesn’t matter… made a huge difference in my DB size. How to keep your recorder database size under control

Thanks, I’ll cross my fingers it reduces over the next few days and have a read of that link. I can’t see anything in the logs to suggest the service call wasn’t working.

I actually don’t see anything in the logs when I call the service. I revised my logger config as below, hoping to see more… but this doesn’t make any difference:

default: error
  homeassistant.components.recorder.util: debug

And so a week after changing the purge settings I still have a 16GB database, which I can see is updating (from Synology DSM date modified information).