There is hass-addons/dbstats at master · jehy/hass-addons · GitHub which may help too.
Now I need to figure out why I have so many call_service events being logged!
There is hass-addons/dbstats at master · jehy/hass-addons · GitHub which may help too.
Call service happens everytime home assistant calls a service (action) in the newer versions. For me my node red automations I have alot of call service (action) nodes. I currently exclude all call_service events from my recorder database, with no negative affects.
One thing to note here is call_service calls may be many but they do not take up much drive volume in the database when compared states and state attributes.
@AJolly thanks for the link to DB stats. Looks like a fantastic tool.
Wow, thanks for introducing the dbstats add-on.
Finding my pihole integration has a specific sensor with the highest number, crazy high “count states” compared to the second highest… 1.7M vs 145K. Will try disabling that and see how the db sizes change after a purge.
Hey,
i currently have a issue with my db size and i´m not sure from what this comming from. My HA instance is about 3 year old and i normally have a db size about 1GB but db size increased drastically and i´m not sure why…
also if i check the via SQL i´m not sure why
recoreder settings are default.
anyone can help me to identify the issue?
EDIT:
i executed a repack action and the db size looks better now:
did you already try to exclude entities from the recorder, or
limit the data storage period of some entities to a shorter period? this can be done with a automation which you can run for example weekly.
with the add on DbStats you can easily check which entities use a lot of space
Optimize Your Home Assistant Database - SmartHomeScene seems to refer to a Rasberry Pi based HA. Does this apply to HA Green too? Does HA Green have a memory with limited read/write cycles like on a Pi’s SD card?
I want to double my number of days recorded but am happy to exclude almost all but the temperature records and calendar.
A need to optimize Recorder settings is not only about prolonging a life time. Consider this as a matter of increasing a performance.
You should read up upon the Recorder Component, in specific # Filter
Sounds to me You would be better off, Using "Only Include ! "
Using Only Include, Will exclude Everything else !
PS: Reading this Topic, OR Search in this Topic, Would have giving You this answer aswell … But for You, Here are The Solution to your answer, Please Read / Search The Topic, And read the Docs About the Specific Components/Integrations You are Wondering About … You will feel more contempt with Your self and your Install by doing So ![]()
Thanks. I was searching for “data storage” which produced limited results. Those in the know likely realise that “recorder” is a better search term.
Yes you are right, and it’s even difficult(cumbersome) to “direct anyone” to specific Doc’s, as they are constantly changing/enhancing the Doc’s (and url’s)
However below, also includes Native/Core Integrations(Components)
Integrations - Home Assistant .
Basically all SD-Cards have way shorter "Life-cycles) Than SSD’s
If You recently Bought HA-Green You have nothing to worry about, But You should consider to eventually , either ADD a DATA-Disk ( possible via GUI ) , This will transfer most “user-files” , So they Green’s SD-Card will only contain the very Basic files, for boot / os etc.,
This will reduce read/writes Significantly ! , On The SD-Card
All kinds of flash-based storage have a limited number of writes. Depending on the kind of the storage device and the technology used in the chip, it can have longer or shorter endurance. Usually, SD cards are cheaper and have less endurance than SSDs. And even different models of SD cards have different endurances
And that’s why picking a higher-quality longer-endurance SD card is a good idea. Likewise, setting up automatic backups are important to safeguard until eventually the flash storage fails.
Dumb question but it says here that Recorder and History are Integrations. But in my list of Integrations they can’t be found or added by searching for them. Where are they hiding?
Yes HA has Many built-in Integrations, ( alot more than the Default-Config, in above link )
Some like i.e Recorder can be “Edited/Configured” in the i.e Configuration.yaml file, which are the HA-Startup config file.
Recorder “Options” beside the default, Is something many people eventually will configure in i.e config.yaml, as it’s default is basically " Record Everything " and keep for 10 days ( Long-terms Statistics will be saved forever ( Thou most likely a DB crash will will change that “fact” ) ![]()
NOTE: My DB “strategy” is, Only Use Include, because if you have a config, with Only Include “specified” it will/should exclude everything else.
( Now adays noone really can’t tell which/how much/many redundant “features/functions/events/state-changes” in a new Device will be Recorded, And it will increase writes/read on the disk Alot )