Page 1 of 1

How to minimize SD card write accesses

Posted: 18 Aug 2020 11:00
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!

Re: How to minimize SD card write accesses

Posted: 22 Aug 2020 16:24
by xurg
No one?

Re: How to minimize SD card write accesses

Posted: 22 Aug 2020 22:05
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.

Re: How to minimize SD card write accesses

Posted: 23 Aug 2020 10:11
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 :-)

Re: How to minimize SD card write accesses

Posted: 23 Aug 2020 12:02
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.

Re: How to minimize SD card write accesses

Posted: 23 Aug 2020 13:34
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?

Re: How to minimize SD card write accesses

Posted: 23 Aug 2020 13:50
by piet66
no, sorry

Re: How to minimize SD card write accesses

Posted: 23 Aug 2020 14:13
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.