This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can microSD flash memory wear be minimized
#1
We are trying to minimize microSD flash memory wear.

Doing "iotop -oaP" reveals standard suspects (see below)
  • journaling system (jbd2)
  • rsyslogd
  • lightdm-gtk-greeter
  • ... custom apps
Can somebody point to comprehensive list on how to reduce / optimize SD flash usage (from system prospective: journaling, rsyslog, lightdm ...) ?

Code:
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  134 be/3 root          0.00 B    684.00 K  0.00 %  0.01 % [jbd2/mmcblk0p2-]
20479 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/u8:0]
 2632 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % diplayer
 1110 be/4 root          0.00 B    428.00 K  0.00 %  0.00 % java -Xmx128m -cp /home/user1/ ...
 1130 be/4 lightdm       0.00 B     52.00 K  0.00 %  0.00 % lightdm-gtk-greeter
  496 be/4 root          0.00 B    648.00 K  0.00 %  0.00 % rsyslogd -n
20048 be/4 root          0.00 B      8.00 K  0.00 %  0.00 % sshd: diuser [priv]
Reply
#2
(12-26-2018, 02:47 PM)nlazovic Wrote: We are trying to minimize microSD flash memory wear.

Doing "iotop -oaP" reveals standard suspects (see below)
  • journaling system (jbd2)
  • rsyslogd
  • lightdm-gtk-greeter
  • ... custom apps
Can somebody point to comprehensive list on how to reduce / optimize SD flash usage (from system prospective: journaling, rsyslog, lightdm ...) ?

Code:
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  134 be/3 root          0.00 B    684.00 K  0.00 %  0.01 % [jbd2/mmcblk0p2-]
20479 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/u8:0]
 2632 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % diplayer
 1110 be/4 root          0.00 B    428.00 K  0.00 %  0.00 % java -Xmx128m -cp /home/user1/ ...
 1130 be/4 lightdm       0.00 B     52.00 K  0.00 %  0.00 % lightdm-gtk-greeter
  496 be/4 root          0.00 B    648.00 K  0.00 %  0.00 % rsyslogd -n
20048 be/4 root          0.00 B      8.00 K  0.00 %  0.00 % sshd: diuser [priv]

Install Armbian and you are done.
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply
#3
(12-26-2018, 04:16 PM)igorpec Wrote:
(12-26-2018, 02:47 PM)nlazovic Wrote: We are trying to minimize microSD flash memory wear.

Doing "iotop -oaP" reveals standard suspects (see below)
  • journaling system (jbd2)
  • rsyslogd
  • lightdm-gtk-greeter
  • ... custom apps
Can somebody point to comprehensive list on how to reduce / optimize SD flash usage (from system prospective: journaling, rsyslog, lightdm ...) ?

Code:
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  134 be/3 root          0.00 B    684.00 K  0.00 %  0.01 % [jbd2/mmcblk0p2-]
20479 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/u8:0]
 2632 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % diplayer
 1110 be/4 root          0.00 B    428.00 K  0.00 %  0.00 % java -Xmx128m -cp /home/user1/ ...
 1130 be/4 lightdm       0.00 B     52.00 K  0.00 %  0.00 % lightdm-gtk-greeter
  496 be/4 root          0.00 B    648.00 K  0.00 %  0.00 % rsyslogd -n
20048 be/4 root          0.00 B      8.00 K  0.00 %  0.00 % sshd: diuser [priv]

Install Armbian and you are done.

Hi Igor.

Do you have some tweaks for Asus Tinker Board? Or are all of them in Armbian?

Best Regards.
Reply
#4
(12-26-2018, 04:16 PM)igorpec Wrote:
(12-26-2018, 02:47 PM)nlazovic Wrote: We are trying to minimize microSD flash memory wear.

Doing "iotop -oaP" reveals standard suspects (see below)
  • journaling system (jbd2)
  • rsyslogd
  • lightdm-gtk-greeter
  • ... custom apps
Can somebody point to comprehensive list on how to reduce / optimize SD flash usage (from system prospective: journaling, rsyslog, lightdm ...) ?

Code:
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  134 be/3 root          0.00 B    684.00 K  0.00 %  0.01 % [jbd2/mmcblk0p2-]
20479 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/u8:0]
 2632 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % diplayer
 1110 be/4 root          0.00 B    428.00 K  0.00 %  0.00 % java -Xmx128m -cp /home/user1/ ...
 1130 be/4 lightdm       0.00 B     52.00 K  0.00 %  0.00 % lightdm-gtk-greeter
  496 be/4 root          0.00 B    648.00 K  0.00 %  0.00 % rsyslogd -n
20048 be/4 root          0.00 B      8.00 K  0.00 %  0.00 % sshd: diuser [priv]

Install Armbian and you are done.

Thanks for the info. We will consider Armbian for next release. 
For current devices, we have to install patch that will reduce SD card wear.
Do you have a list of TODO's or know of any posts that list major items to do to reduce SD wear on Tinkerboard OS ?
Reply
#5
Trim ?
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#6
(12-26-2018, 07:11 PM)nlazovic Wrote:
(12-26-2018, 04:16 PM)igorpec Wrote:
(12-26-2018, 02:47 PM)nlazovic Wrote: We are trying to minimize microSD flash memory wear.

Doing "iotop -oaP" reveals standard suspects (see below)
  • journaling system (jbd2)
  • rsyslogd
  • lightdm-gtk-greeter
  • ... custom apps
Can somebody point to comprehensive list on how to reduce / optimize SD flash usage (from system prospective: journaling, rsyslog, lightdm ...) ?

Code:
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
  134 be/3 root          0.00 B    684.00 K  0.00 %  0.01 % [jbd2/mmcblk0p2-]
20479 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/u8:0]
 2632 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % diplayer
 1110 be/4 root          0.00 B    428.00 K  0.00 %  0.00 % java -Xmx128m -cp /home/user1/ ...
 1130 be/4 lightdm       0.00 B     52.00 K  0.00 %  0.00 % lightdm-gtk-greeter
  496 be/4 root          0.00 B    648.00 K  0.00 %  0.00 % rsyslogd -n
20048 be/4 root          0.00 B      8.00 K  0.00 %  0.00 % sshd: diuser [priv]

Install Armbian and you are done.

Thanks for the info. We will consider Armbian for next release. 
For current devices, we have to install patch that will reduce SD card wear.
Do you have a list of TODO's or know of any posts that list major items to do to reduce SD wear on Tinkerboard OS ?

We started to deal with this problem early in the project (2013) and optimisations are common for all boards. The only difference is that more (RAM) powerful boards can have bigger caching. We focused a lot into this problem since its one of the major ones and come out with the best out of the box settings. You can ofc go further, down to full read only root fs. You can enable it in armbian-config.

Don't keep this list updated any more, out of my head: it start with ramlog, fs garbage commit delay, no swap - zram, optional overlayroot, ...

Armbian comes with all this by default. No further waste of time is needed. Your script should also probably work OOB.
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Reply
#7
I set /tmp as tmpfs and I don't see much importance to use a swap file/partition, nor for a compressed ramdisk. But I think the issue has been pinpointed to the most efficient method.
For some case I'd set /var/log in tmpfs. Of course apache2 is an issue which should be rectified to set its logs in /var/lib.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)