# Influxdb WAL and SD cards

**URL:** <https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575>\
**Category:** General\
**Created:** [31 May 2020 15:32 UTC](https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575 "2020-05-31T15:32:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [31 May 2020 15:32 UTC](https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575/1 "2020-05-31T15:32:30Z")

</div>

Hi,

not a question directly related to node-red, but I guess many people here might use influx databases.

So far I had influx data on an external usb stick. Since I now need that port for something else and generally the size of my database is small anyway, I want to store it to the SD card the system is running from (an old cubietruck)

Is it necessary/recommended to play with the `wal-fsync-delay` or similar settings? Maybe even move the WAL to a ramdisk?

Although am I using a good and large SD card and never had issues so far, I think that it is just not right to write to the file system when ever a sensor reports a new value. Caching those in memory and doing writes every couple hours seems much more sensible.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 June 2020 20:00 UTC](https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575/2 "2020-06-02T20:00:39Z")

</div>

> [@cinhcet](#):
>
> Is it necessary/recommended to play with the `wal-fsync-delay` or similar settings? Maybe even move the WAL to a ramdisk?
> 
> Although am I using a good and large SD card and never had issues so far, I think that it is just not right to write to the file system when ever a sensor reports a new value. Caching those in memory and doing writes every couple hours seems much more sensible.

I do not believe so. I have had 2 Pi's running 24x7x365 for some years now with the same cards and I do nothing to reduce writes to he cards. I have many outputs writing to MQTT with retention and to InfluxDB as well as all of the logging output from the system, Node-RED, InfluxDB, MQTT, Telegraf Unifi controller and more. Admittedly, I do keep my sensors to reporting once a minute generally so I don't go mad with them. But either way, neither card shows any sign of issues even after 3+ years of solid work.

As far as I can tell, 3 factors influence things:

1. Good, branded SD-Cards.
2. Large sizes so that wear levelling has plenty of room to work with.
3. A decent power supply to minimise power issues.

I do have my Pi's attached to a PC UPS which doubtless helps. Though my Pi3 constantly reports low power issues and has occasionally hung or rebooted on me. The Pi2 hasn't skipped a beat in a long time though.

---

<div class="post-metadata">

**Author:** ![cinhcet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cinhcet/32/438_2.png) [@cinhcet](https://discourse.nodered.org/u/cinhcet)\
**Post date:** [2 June 2020 20:56 UTC](https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575/3 "2020-06-02T20:56:21Z")

</div>

ok, then I will probably just try that too. I am using 32gb ScanDisk (extreme? don't remember correctly).

Thanks.

I have to say that with one of my raspberries, I had a lot of trouble in the beginning with SD cards, even though it was a high quality one (but only 8 gb)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 August 2020 20:56 UTC](https://discourse.nodered.org/t/influxdb-wal-and-sd-cards/27575/4 "2020-08-01T20:56:47Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
