[SOLVED] Size of the database influxdb


(Juan) #1

Hi there,

I do not want to disturb with new threat just for a question I am confused. Hope you can clarify me.

I see that the size of my folder /var/lib/influxdb is increasing the size 1Mb per minute. I see that the folder walis growing up all time.

My question are:

  1. the folder with the database is actaully /var/lib/influxdb/data/openhab_db???
  2. What’s happen with the other folder wal and meta?
  3. Why I see that the folder influxdb is increasing the size?
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/data/openhab_db
156K	/var/lib/influxdb/data/openhab_db
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/data
3,5M	/var/lib/influxdb/data
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/wal
31M	/var/lib/influxdb/wal
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/meta
8,0K	/var/lib/influxdb/meta
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/
34M	/var/lib/influxdb/
pi@pi:/var/lib/influxdb $ sudo du -sh /var/lib/influxdb/
35M	/var/lib/influxdb/

I am using a SD card, because this info is nothing and I am using a raspberry pi.

Thank you!


(Vincent Regaud) #2

Don’t threaten me… I think you meant thread

It’s never an issue to open a new thread as long as the question is relevant to OH2

Back to your problem, see:

YOUR data is in /var/lib/influxdb/data
The wal directory is used by influx to manage incoming data and grows until a certain size is reached and then compressed and archived.

Yes

See link above

Because that folder contains data, wal and meta. As wal grows, so does the parent directory.


(Vincent Regaud) #3

I highly recommend that you use an SSD and USB port
You SD card WILL FAIL
You can boot from the SD card and move everything else to the SSD.
I believe that openHABian has an option to do that


(Vincent Regaud) #4

(Juan) #5

Jajaja sorry yes. I meant thread.
Thank you for your answer.


(Juan) #6

You mean this functionality right?

well, I guess I can move openhabian to an USB stick as you said. And for the other Raspberry that I use for my Cloud and to store data of influx, I might use an SSD.

It is recommended to have Influx running in other system different than openhab one.

Thanks for the clarification. :wink:


(Vincent Regaud) #7

I didn’t say USB stick, I said SSD. A USB stick uses the same technology as an SD card (An SSD too by the way but it has protection buffers) and the stick will fail eventually too.
I use good old fashioned hard drives for storage, swapping and logging. I use SSD for the OS and I try to minimize the writes on it.