Database size grew significantly in past year

58 views
Skip to first unread message

Chip Towner

unread,
Nov 18, 2021, 1:08:15 PM11/18/21
to weewx-user
I have Weewx running on a RaspberryPi and am changing out the SD card which was behaving badly.  In the process I noticed that the database has grown significantly in the 1 year since I had performed my last software update.  Last year the database was about 950KB and I believe (but could be wrong) this covered several years of operation and today it is 145MB.  

The growth concerns me and I would like to understand what is causing it and how this impacts the performance of the RPi which is older and has very little RAM (512M) by todays standards.  I know enough about databases to be very dangerous but am not afraid to dig into it.  

So any help or advice would be much appreciated.

Chip

vince

unread,
Nov 18, 2021, 1:25:17 PM11/18/21
to weewx-user
Database size has nothing to do with the amount of RAM your computer has, nor how much RAM weewx needs (which is not much).

If you upgraded to v4 and used the extended schema, yes it added a lot of typically unused fields and tables, but it didn't increase the size tremendously.   I did the measurement before and after during the development cycle and it was visible but not anything too significant.

My database going back 15 years (wow) now is 352 MB in size for my VP2 on a 5-minute interval period.   Tiny these days.

gjr80

unread,
Nov 18, 2021, 3:38:33 PM11/18/21
to weewx-user
Sounds to me like the starting size is the odd figure here - 950kb for ‘several years of data’ is rather low in my experience. I have a number of databases of simulator data covering various periods and the smallest of these is 2.6Mb for one month of data. It goes up from there. One year is 39Mb and 10 years 234MB. These are all wview schema.

I wouldn’t be concerned.

Gary

Chip Towner

unread,
Nov 18, 2021, 5:52:33 PM11/18/21
to weewx-user
Thanks for the reply Vince.  I had upgraded to V4, do not recall if I used the extended schema unless the default setting then I likely went with that option. Good to hear that the size of the database is not connected to RAM.  Nice to know performance shouldn't be impacted and it sounds like my current file size is closer to the norm so I don't need to worry it will increase to many GB next year.
Thanks again!

Chip Towner

unread,
Nov 18, 2021, 5:54:09 PM11/18/21
to weewx-user
Gary,
Thanks, not sure why my dB was so small, but at this point doesn't really matter I guess.

Cheers!
Chip

Reply all
Reply to author
Forward
0 new messages