Not really sure where to put this. After reading concerns about wearing out the built in flash, I decided to add the Disks monitor to see how often mmcblk0p1 is written to. I set up the block_dump debugging outlined here and left it on for a little over 10 hours.
I found that a few processes write to the disk.
Kresd writes to it once every 1:20:21 (one hour, 20 minutes and 21 seconds)
btrfs-transaction writes to it much more often, every 30-45 seconds, 2-13 writes each time with 256 sectors
kworker/u4:4 writes to it randomly every 0-30-ish seconds with 8 sectors, 150-270 writes each time.
Does this seem like normal activity?
It does seem like a lot of writes, but I donāt really know. In my past experience with OpenWRT, this sort of thing was dealt with using overlay filesystems on USB drives. Otherwise, I donāt think the flash space was written much at all.
I set this up: echo 1 > /proc/sys/vm/block_dump
and looked at the syslog output which I send to my server elsewhere on my network.
grep "debug kernel" doesnāt seem to yield anything, but looking for WRITE block does still show btrfs still writes to the disk pretty often.
Looking at the wear of my eMMC makes me a little concerned:
mmc extcsd read /dev/mmcblk0 | grep EXT_CSD_DEVICE_LIFE_TIME_EST
eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01
eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x02
seems to indicate my eMMC has used up around 20% of itās reallocation sectors. I realize Iāll have to move to an mSATA disk at some point, and I hope the uboot firmware is updated before then for my older Omnia.
From what I read, itās more about the recovery options, but i could be wrong. I was looking for the issues the other day, but couldnāt find them. Itās not urgent or particularly important at the moment, but I also donāt want to wait until it is. Perhaps that makes it important, but not urgent.
Is it useful or recommended to periodically run a fstrim command on the root ā/ā btrfs file system (mmcblk0p1) or it can negatively affect the lifetime of the eMMC flash ?
Or maybe, there Is already a āTRIMā cron or timer configured by default in Omia OS ?
That said most TRIM related publications are focussing on SSD and there is not much on the impact/effects on different file systems, let alone on the combination TRIM < eMMC > BTRFS.
its possible to apply it also to 3.x branch? ie. could you please link the fix, maybe it could be backportedā¦?
anyway kworker and transaction worries me even more. I will try to watch writes on my router for a while. Could someone expleains, what this kworker could be?