Database size #2755
-
I was wondering about the database size and what it should be. Mine is currently 934 megs. I am not concerned about the hdd space being used, Frigate is using around 4TB in media. I was interested to know if that is the usual database size? The event viewer does take some time to load when it first starts up. |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 2 replies
-
How many cameras do you have and what are your retain settings? |
Beta Was this translation helpful? Give feedback.
-
6 cameras. record:
enabled: true
retain:
days: 10
mode: all
events:
pre_capture: 10
post_capture: 15
objects:
- person
retain:
default: 15
mode: active_objects
objects:
person: 30 Tracking dog, person & car snapshots for 7 days default and 60 days for person |
Beta Was this translation helpful? Give feedback.
-
Would you be willing to share the .db file with me privately on Google Drive to test a few things? You can share with: |
Beta Was this translation helpful? Give feedback.
-
You're like a doctor right? Keep all my secrets... |
Beta Was this translation helpful? Give feedback.
-
When I vacuumed the database it went down to 240mb, so you just have a lot of empty space in there. Sqlite will reuse that empty space, so you shouldn't see it grow more unless you fill all the existing empty space. Did you have a lot more events and/or recordings at one point? I need think about ways to add a vacuum feature in an upcoming release. Thanks for asking. |
Beta Was this translation helpful? Give feedback.
-
I’ve changed settings over the last few months, not sure if it would have been that much or not… I’m not familiar with the vacuuming. Would that make any difference to the performance of the event viewer or just purely the space taken up? Also, does the amount of cars that are being detected/tracked/screenshots have the biggest effect on the database size? Ie. would it be worth stopping that tracking to trade off for speed |
Beta Was this translation helpful? Give feedback.
-
I wouldn't expect much of a performance impact, just storage. Are you talking about the performance of the events page or the recordings page? |
Beta Was this translation helpful? Give feedback.
-
Events page. Takes minimum 35 seconds to load, sometimes up to a minute. |
Beta Was this translation helpful? Give feedback.
-
Which version are you running? |
Beta Was this translation helpful? Give feedback.
-
0.10.0 Beta 8 |
Beta Was this translation helpful? Give feedback.
-
I see it. I will be working on database performance in an upcoming release. I was able to add an index and get dramatically better performance. There are a few areas like this in the app. |
Beta Was this translation helpful? Give feedback.
-
Sounds good, I look forward to testing it out. Should I try vacuuming my database or not worry? |
Beta Was this translation helpful? Give feedback.
-
I don't think it will help anything. |
Beta Was this translation helpful? Give feedback.
When I vacuumed the database it went down to 240mb, so you just have a lot of empty space in there. Sqlite will reuse that empty space, so you shouldn't see it grow more unless you fill all the existing empty space. Did you have a lot more events and/or recordings at one point? I need think about ways to add a vacuum feature in an upcoming release. Thanks for asking.