How to minimize SD card write accesses

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

How to minimize SD card write accesses

Post by xurg »

(I posted this in the RaZberry area already but that was probably the wrong place - my issue isn't related to the RaZberry extension board.)

I know this has been discussed in some ways in the past. I also checked the PDF documentation but in the end I was not able to find all the answers I'm looking for.

So - in an effort to mininize SD Card write accesses on a a Pi 3 (Debian Buster) I noticed the following "offenders":

Code: Select all

/opt/z-way-server/config/zddx/e4918c29-DevicesData.xml
/opt/z-way-server/automation/storage/zwayparsedPacketsjson-f1aed46af7fae1368e78db7768e4d9e5.json
/opt/z-way-server/automation/storage/zwayoriginPacketsjson-2ad2998bc2cb543d29ac586cec215398.json
/opt/z-way-server/automation/storage/notifications-f37bd2f66651e7d46f6d38440f2bc5dd.json
Those seem to be written to quite frequently. (config/zddx was probabably a bogus hit because I think it's not touched when not running the webif.) My questions on these files would be:
  1. Are there ways to limit the frequency with which they are written?
  2. Can the amount be controlled?
  3. Are all of those files even required for proper operation?
  4. Is there any documentation related to my issues and those files I can read?
Any help, hints, pointers will be greatly appreciated!
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: How to minimize SD card write accesses

Post by xurg »

No one?
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
piet66
Posts: 277
Joined: 04 Feb 2017 17:00

Re: How to minimize SD card write accesses

Post by piet66 »

In zwayparsedPacketsjson and zwayoriginPacketsjson the incoming and outgoing z-wave packets are logged. As a basis for ZNiffer. Size is fixed in module ZWave/index.js to max 5000 records/ 24 hours.

In notifications the messages for SmartUI page are written. Responsible is module InbandNotifications. There it's fixed, which messages are stored. File size is limited in AutomationController.js.

In DevicesData.xml the current configuration is stored. Don't touch!

One possibility to minimize write access is to switch off debug by setting loglevel to 1 in config.xml.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me(327) ZW0700 7.21.00 07.42/17367041 1025/257
Z-Way version v4.1.2 from 2023-10-18 03:34:26 +0300
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: How to minimize SD card write accesses

Post by xurg »

Thanks for responding, @piet66. You say zwayparsedPacketsjson and zwayoriginPacketsjson is intended for ZNiffer. From that I would gather that those files are not strictly needed for normal operation. What is the maximum Z-Wave packet size, ie. how big can those files grow with 5000 packets and would it be possible to symlink them to a file sitting in tmpfs?

Same question for notifications-f37bd2f66651e7d46f6d38440f2bc5dd.json - would it be ok to symlink it to a tmpfs?

My log level is already set to 2 and thanks for the hint wrt DevicesData.xml, I figured as much :-)
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
piet66
Posts: 277
Joined: 04 Feb 2017 17:00

Re: How to minimize SD card write accesses

Post by piet66 »

For me:
4500 packets, zwayoriginPacketsjson: 676 KiB, zwayparsedPacketsjson: 750 KiB

The code of InbandNotifications I have changed, so that only the messages of those devices are stored, which I really need. There is a lot of useless messages.

I think all three files are not important. You can decrease the sizes in source code or you can put them to another place. In both cases you have to do that again after an update.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me(327) ZW0700 7.21.00 07.42/17367041 1025/257
Z-Way version v4.1.2 from 2023-10-18 03:34:26 +0300
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: How to minimize SD card write accesses

Post by xurg »

Thanks - I'll be monitoring those files for a little while to get a better feel for the sizes.

Could you also comment on zwayrssidatajson and in what way it is generated and/or required?
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
piet66
Posts: 277
Joined: 04 Feb 2017 17:00

Re: How to minimize SD card write accesses

Post by piet66 »

no, sorry
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me(327) ZW0700 7.21.00 07.42/17367041 1025/257
Z-Way version v4.1.2 from 2023-10-18 03:34:26 +0300
xurg
Posts: 52
Joined: 17 Aug 2020 22:38

Re: How to minimize SD card write accesses

Post by xurg »

No worries.

From your hint to ZWave/index.js I've now seen that rssidata.json is only kept for the past 24 hours.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster)
RaZberry ZW0500 1024/2 SDK: 6.82.01 API: 05.39
Z-Way version v4.1.0
Post Reply