schollz / norns.online

online norns with norns.online
https://norns.online
MIT License
39 stars 3 forks source link

Use a tmpfs mountpoint for volatile data #4

Open p3r7 opened 3 years ago

p3r7 commented 3 years ago

norns.online logs and produces screenshots in /tmp.

On norns OS images, /tmp has no dedicated tmpfs mountpoint and depends of the root partition (on flash / SD card).

we@norns:~/dust/code$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.2G  2.7G  4.2G  39% /
devtmpfs        449M     0  449M   0% /dev
tmpfs           453M   84M  370M  19% /dev/shm
tmpfs           453M   12M  442M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           453M     0  453M   0% /sys/fs/cgroup
/dev/mmcblk0p1   43M   31M   13M  72% /boot
tmpfs            91M     0   91M   0% /run/user/1000

Repetitive writes could decrease the life expectancy of the storage medium.

A better solution would be to produce volatile data on a memory mountpoint. 3 solutions:

schollz commented 3 years ago

thanks i opted to use /dev/shm and removed logging. would be better to have a dedicated tmpfs so i'll leave this open until i can do that