ZRAM issues

before I try this

first of all: Thank you for your quick response
second: what Version of the openhabian-config am I have to use?

master

[10:36:34] openhabian@openhab:~$ journalctl -xe
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.layout.TextEncoderHelper.encodeText(TextEncoderHelper.java:65)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:68)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.layout.StringBuilderEncoder.encode(StringBuilderEncoder.java:32)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:227)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:59)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:197)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:190)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:181)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:252)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:543)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:502)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:485)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:412)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:154)
Jun 12 10:36:34 openhab karaf[640]:         at org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog0(PaxLoggerImpl.java:354)
Jun 12 10:36:34 openhab karaf[640]:         at org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog(PaxLoggerImpl.java:337)
Jun 12 10:36:34 openhab karaf[640]:         at org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.inform(PaxLoggerImpl.java:149)
Jun 12 10:36:34 openhab karaf[640]:         at org.ops4j.pax.logging.internal.TrackingLogger.inform(TrackingLogger.java:120)
Jun 12 10:36:34 openhab karaf[640]:         at org.ops4j.pax.logging.slf4j.Slf4jLogger.info(Slf4jLogger.java:537)
Jun 12 10:36:34 openhab karaf[640]:         at org.eclipse.smarthome.io.monitor.internal.EventLogger.receive(EventLogger.java:53)
Jun 12 10:36:34 openhab karaf[640]:         at org.eclipse.smarthome.core.internal.events.EventHandler.lambda$0(EventHandler.java:155)
Jun 12 10:36:34 openhab karaf[640]:         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Jun 12 10:36:34 openhab karaf[640]:         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Jun 12 10:36:34 openhab karaf[640]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Jun 12 10:36:34 openhab karaf[640]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Jun 12 10:36:34 openhab karaf[640]:         at java.lang.Thread.run(Thread.java:748)
Jun 12 10:36:34 openhab karaf[640]: Caused by: java.io.IOException: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
Jun 12 10:36:34 openhab karaf[640]:         at java.io.RandomAccessFile.writeBytes(Native Method)
Jun 12 10:36:34 openhab karaf[640]:         at java.io.RandomAccessFile.write(RandomAccessFile.java:525)
Jun 12 10:36:34 openhab karaf[640]:         at org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.writeToDestination(RollingRandomAccessFileManager.java:137)
Jun 12 10:36:34 openhab karaf[640]:         ... 36 more
Jun 12 10:36:34 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:34 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:37 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:37 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:40 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:40 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:42 openhab influxd[643]: [httpd] 127.0.0.1 - - [12/Jun/2020:10:36:42 +0200] "POST /write?db=telegraf HTTP/1.1" 401 55 "-" "Telegraf/1.14.4" d79c7b13-ac87-11ea-8009-dca632688824 116
Jun 12 10:36:42 openhab telegraf[637]: 2020-06-12T08:36:42Z E! [outputs.influxdb] When writing to [http://localhost:8086]: received error unable to parse authentication credentials; discarding points
Jun 12 10:36:43 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:43 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:47 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:47 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:49 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:49 openhab rsyslogd[554]: action 'action-2-builtin:omfile' resumed (module 'builtin:omfile') [v8.1901.0 try https://www.rsyslog.com/e/2359 ]
Jun 12 10:36:52 openhab influxd[643]: [httpd] 127.0.0.1 - - [12/Jun/2020:10:36:52 +0200] "POST /write?db=telegraf HTTP/1.1" 401 55 "-" "Telegraf/1.14.4" dd95429e-ac87-11ea-800a-dca632688824 116
Jun 12 10:36:52 openhab telegraf[637]: 2020-06-12T08:36:52Z E! [outputs.influxdb] When writing to [http://localhost:8086]: received error unable to parse authentication credentials; discarding points
Jun 12 10:36:52 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/2007 ]
Jun 12 10:36:52 openhab rsyslogd[554]: action 'action-2-builtin:omfile' suspended (module 'builtin:omfile'), next retry is Fri Jun 12 10:37:22 2020, retry nbr 0. There should be messages before this one giving the reason for suspension. [v8.1901.0 try https://www.rsyslog.com/e/200
Jun 12 10:37:02 openhab influxd[643]: [httpd] 127.0.0.1 - - [12/Jun/2020:10:37:02 +0200] "POST /write?db=telegraf HTTP/1.1" 401 55 "-" "Telegraf/1.14.4" e387a8a1-ac87-11ea-800b-dca632688824 126
Jun 12 10:37:02 openhab telegraf[637]: 2020-06-12T08:37:02Z E! [outputs.influxdb] When writing to [http://localhost:8086]: received error unable to parse authentication credentials; discarding points

Your / is still full. Free space there (but remember old /var/log is hidden unless you stop zram).

$ sudo systemctl status zram-config

**●** zram-config.service - zram-config

Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)

Active: **active (exited)** since Fri 2020-06-12 10:34:32 CEST; 21min ago

Process: 328 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)

Main PID: 328 (code=exited, status=0/SUCCESS)

Jun 12 10:34:31 openhab zram-config[328]: mv: der Aufruf von stat für '/usr/local/share/zram-config/zram-device-list.new' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: mv: der Aufruf von stat für '/usr/local/share/zram-config/zram-device-list.new' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: mv: der Aufruf von stat für '/usr/local/share/zram-config/zram-device-list.new' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:31 openhab zram-config[328]: stat: der Aufruf von stat für 'stat' ist nicht möglich: Datei oder Verzeichnis nicht gefunden

Jun 12 10:34:32 openhab systemd[1]: Started zram-config.

I tried reproducing and think it would happen with an old version of zram-config.
So replace yours with latest, append a -x to first line to get meaningful output nect time it is run.
Also check the log in /usr/local/share/zram-config/logs.
@Lars_R FYI, too.

What I did:

  1. followed your link and instructions
  • sudo apt-get install git
    
  • git clone https://github.com/StuartIanNaylor/zram-config
    
  • cd zram-config
    

manually append a -x in zram-config like this:

  • #! /bin/bash -x
    
  • sudo sh install.sh
    
  1. Installation performed without errors

  2. Rebooting the system sudo reboot

  3. Checked sudo systemctl status zram-config (no errors)

● zram-config.service - zram-config
Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-06-12 12:36:09 CEST; 2min 16s ago
Process: 352 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
Main PID: 352 (code=exited, status=0/SUCCESS)

Jun 12 12:36:09 openhab zram-config[352]: + echo ‘log /zram1 /var/log /log.bind’
Jun 12 12:36:09 openhab zram-config[352]: + invoke-rc.d rsyslog restart
Jun 12 12:36:09 openhab zram-config[352]: + journalctl --flush
Jun 12 12:36:09 openhab zram-config[352]: + ‘[’ ‘!’ -z /opt/zram/oldlog ‘]’
Jun 12 12:36:09 openhab zram-config[352]: + echo ‘olddir /opt/zram/oldlog’
Jun 12 12:36:09 openhab zram-config[352]: + echo ‘createolddir 755 root root’
Jun 12 12:36:09 openhab zram-config[352]: + echo renamecopy
Jun 12 12:36:09 openhab zram-config[352]: + read -r line
Jun 12 12:36:09 openhab zram-config[352]: + ‘[’ false = true ‘]’
Jun 12 12:36:09 openhab systemd[1]: Started zram-config.

  1. Checked systemctl status nginx.service (with errors)

nginx.service - A high performance web server and a reverse proxy server

Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Fri 2020-06-12 12:36:25 CEST; 2min 57s ago

Docs: man:nginx(8)

Process: 627 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jun 12 12:36:20 openhab systemd[1]: Starting A high performance web server and a reverse proxy server…

Jun 12 12:36:21 openhab nginx[627]: nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (28: No space left on device)

Jun 12 12:36:25 openhab nginx[627]: 2020/06/12 12:36:21 [emerg] 627#627: open() “/var/log/nginx/access.log” failed (28: No space left on device)

Jun 12 12:36:25 openhab nginx[627]: nginx: configuration file /etc/nginx/nginx.conf test failed

Jun 12 12:36:25 openhab systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE

Jun 12 12:36:25 openhab systemd[1]: nginx.service: Failed with result ‘exit-code’.

Jun 12 12:36:25 openhab systemd[1]: Failed to start A high performance web server and a reverse proxy server

  1. checked zram-config.log (entries since start)

zram-config start 2020-06-12-12:36:08

ztab create swap lz4 250M 750M 75 0 80

insmod /lib/modules/4.19.118-v7l+/kernel/mm/zsmalloc.ko

insmod /lib/modules/4.19.118-v7l+/kernel/drivers/block/zram/zram.ko

zram0 created comp_algorithm=lz4 mem_limit=250M disksize=750M

Setting up swapspace version 1, size = 750 MiB (786427904 bytes)

LABEL=zram-config0, UUID=bde800a9-ae40-4472-8d7a-5fc3ac5de39c

swapon: /dev/zram0: found signature [pagesize=4096, signature=swap]

swapon: /dev/zram0: pagesize=4096, swapsize=786432000, devsize=786432000

swapon /dev/zram0

vm.page-cluster = 0

vm.swappiness = 80

ztab create log lz4 50M 150M /var/log /log.bind /opt/zram/oldlog

Warning: Stopping rsyslog.service, but it can still be activated by:

syslog.socket

dirPerm /var/log 755 0:0

mount: /var/log bound on /opt/zram/log.bind.

mount: /opt/zram/log.bind propagation flags changed.

dirMountOpt rw,noatime dirFsType ext4

zram1 created comp_algorithm=lz4 mem_limit=50M disksize=150M

mke2fs 1.44.5 (15-Dec-2018)

fs_types for mke2fs.conf resolution: ‘ext4’, ‘small’

Discarding device blocks: 4096/38400^H^H^H^H^H^H^H^H^H^H^H ^H^H^H^H^H^H^H^H^H^H^Hdone

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

38400 inodes, 38400 blocks

1920 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=39845888

2 block groups

32768 blocks per group, 32768 fragments per group

19200 inodes per group

Filesystem UUID: e24c059e-d7b7-4430-abd3-10a5954a021b

Superblock backups stored on blocks:

32768

Allocating group tables: 0/2^H^H^H ^H^H^Hdone

Writing inode tables: 0/2^H^H^H ^H^H^Hdone

Creating journal (4096 blocks): done

Writing superblocks and filesystem accounting information: 0/2^H^H^H ^H^H^Hdone

mount: /dev/zram1 mounted on /opt/zram/zram1.

mount: overlay1 mounted on /var/log.

By the time you run nginx start, /var/log is full. If ZRAM is off at that time, that is actually the same as / so you can delete other unneeded stuff from /, too.

So free space there! You still have not done that.
apt-cache clean or apt autoremove often help without doing harm.
Stop ZRAM before or delete older files from what is named as bind_dir for /var/log in ztab)

PS: you can also do journalctl -u zram-config or nginx

OK

  1. OK, I stopped zRam sudo service zram-config stop

  2. I cleared all the logs in /var/log with
    sudo find /var/log/ -type f -exec cp /dev/null {} \;
    which I found here https://serverfault.com/a/155301

  3. Reduced size of Journalctl via journald.conf wich was over 2GB
    https://got-tty.org/journalctl-via-journald-conf-die-loggroesse-definieren

  4. system reboot

  5. So far - so good - Everything (incl. ngix) works as expected

Thank you very much

I have the issue that all logging seems to stop after ~3 days on my RPi4 with 4GB of memory.

dmesg gives me plenty of errors for writting journal entries (i forgot to copy them before restarting).
zramctl looked ok and was nowhere near full.
df -h also didn’t show anything special.

what would be the best way to debug this?

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

1 Like

Sorry for not being clearer and I hope this is not considered high jacking because the problem was mentioned here before…
Today it happened again.
I’m trying to give as much useful information as possible but because all logging in the system essentially stops it is difficult. Please let me know if I missed something!

openhabian@openHAB:~ $ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle 250M 240.6M 46.1M 120.9M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 200M 12K 1.4K 8K 4 [SWAP]

openhabian@openHAB:~ $ cat /etc/ztab
# swap	alg		mem_limit	disk_size	swap_priority	page-cluster	swappiness
swap	lzo-rle		200M		600M		75		0		80

# dir	alg		mem_limit	disk_size	target_dir			bind_dir
dir	lzo-rle		150M		1000M		/var/lib/openhab2/persistence	/persistence.bind

# log	alg		mem_limit	disk_size	target_dir		bind_dir		oldlog_dir
log	lzo-rle		250M		500M		/var/log		/log.bind

openhabian@openHAB:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 6.7G 22G 25% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 179M 1.8G 10% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 30G 45M 28G 1% /storage
/dev/mmcblk0p1 253M 45K 253M 1% /boot
/dev/zram1 227M 222M 0 100% /opt/zram/zram1
overlay1 227M 222M 0 100% /var/log
tmpfs 388M 0 388M 0% /run/user/1000

events.log & openhab.log just stop mid line and will not continue to be filled.
It seems like the 250mb memory limit is used as a maximum size for zram device and not the 500mb that it should if I understood the config correctly.
Also shouldn’t old logs not gotten rotated out of that folder? I have a few log.1 log.2 and log.gz files there that fill up the device.

Read more carefully.
You still fail to give the basicmost information. OS, OH versions ? openHABian branch ?

Right. That should not happen. Have you restarted ZRAM or rebooted ? Reinstalled ?

no
OH handles that

There was a bug in the creation of zram devices that was causing the mem limit to be used as both the max disk size and mem limit for all devices. If you reinstall it should be fixed and resolve your issue.

This is what openhabian-config gives me:

openHABian Configuration Tool [main]v1.6.3-1192(9b398a9)

I’m on the main branch with OH3 Milestone 1
Not sure where I can find the exact Openhabian OS Version.

If I restart the issue goes away for a bit till the zram device is full again.

I just reinstalled zram (uninstall, reboot, install) via openhabian-cli.

How can I verify i have the correct version?
It seems to still limit the disk size by the mem_limit.

openhabian@openHAB:/var/log/openhab $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 6.8G 22G 25% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 9.4M 1.9G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 30G 45M 28G 1% /storage
/dev/mmcblk0p1 253M 48M 205M 19% /boot
/dev/zram1 227M 193M 16M 93% /opt/zram/zram1
overlay1 227M 193M 16M 93% /var/log
tmpfs 388M 0 388M 0% /run/user/1000

The output of zramctl should look something like this and if it does then it is fixed. Pay special attention to the DISKSIZE column as is should match yours exactly if it is fixed.

NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 zstd          600M 42.3M  2.6M 10.4M       4 /opt/zram/zram2
/dev/zram1 zstd          900M 46.8M  1.8M 21.9M       4 /opt/zram/zram1
/dev/zram0 lzo-rle       600M 29.7M   12M 15.4M       4 [SWAP]

I feel I don have to fix…

openhabian@openHAB:/var/log/openhab $ zramctl --version
zramctl from util-linux 2.33.1
openhabian@openHAB:/var/log/openhab $ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo-rle 250M 214.4M 38M 107M 4 /opt/zram/zram1
/dev/zram0 lzo-rle 200M 4K 86B 4K 4 [SWAP]
openhabian@openHAB:/var/log/openhab $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 6.8G 22G 25% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 9.4M 1.9G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda3 30G 45M 28G 1% /storage
/dev/mmcblk0p1 253M 48M 205M 19% /boot
/dev/zram1 227M 199M 11M 96% /opt/zram/zram1
overlay1 227M 199M 11M 96% /var/log
tmpfs 388M 0 388M 0% /run/user/1000

But if i read ztab right it should be 500MB not 250MB

# swap	alg		mem_limit	disk_size	swap_priority	page-cluster	swappiness
swap	lzo-rle		200M		600M		75		0		80

# dir	alg		mem_limit	disk_size	target_dir			bind_dir
dir	lzo-rle		150M		1000M		/var/lib/openhab2/persistence	/persistence.bind

# log	alg		mem_limit	disk_size	target_dir		bind_dir		oldlog_dir
log	lzo-rle		250M		500M		/var/log		/log.bind

I used openhabian-config to first uninstall and then reinstall zram. Is there a better method to ensure I have the correct version installed?

No, you are not on the latest version. Try running it again make sure that you reboot in between uninstalling and reinstalling as a precaution. To be extra safe you could try running sudo rm -rf /opt/zram after uninstalling and rebooting to ensure that openhabian-config will redownload zram when installing.

@ndye Thanks! I think deleting /opt/zram did the trick!
I also noticed that the /etc/ztab got overwritten, but I guess that on purpose.

Yep, glad it worked!