Slackware - ARM This forum is for the discussion of Slackware ARM. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-15-2019, 10:50 AM
|
#1
|
LQ Newbie
Registered: Jan 2012
Posts: 9
Rep: 
|
Using tmpfs tricks to reduce SD card writes
I would be interested to know if and how others have used tmpfs to reduce frequency of writes to their SD cards, the idea being to maybe prolong SD card life by writing a lot of logs and stuff that doesn't need to persist to RAM.
/var/log is an obvious candidate to mount on tmpfs, but up to slackware 14.2 package management depends on a couple of directories in /var/log. I've mounted /var/log on tmpfs and have a bunch of symlinks made on boot in rc.local to new directories in /usr/local/var/log from /var/log/packages (.../removed_packages, /scripts, /removed_scripts, /setup). So far it's worked well, and left me with a useable amount of RAM.
With CLEANUP:-YES in sbopkg.conf and judicious removal of built trees and packages, building sessions into a /tmp mounted on large tmpfs also work.
Anything else? Source caches, browser caches &c.?
Last edited by forestcreature; 07-15-2019 at 02:05 PM.
|
|
|
07-15-2019, 11:59 AM
|
#2
|
LQ Newbie
Registered: Mar 2018
Location: Bulgaria
Distribution: Slackware
Posts: 27
Rep: 
|
Quote:
Originally Posted by forestcreature
I would be interested to know if and how others have used tmpfs to reduce frequency of writes to their SD cards, the idea being to maybe prolong SD card life by writing a lot of logs and stuff that doesn't need to persist to RAM.
/var/log is an obvious candidate to mount on tmpfs, but slackware package management depends on a couple of directories in /var/log. I've mounted /var/log on tmpfs and have a bunch of symlinks made on boot in rc.local to new directories in /usr/local/var/log from /var/log/packages (.../removed_packages, /scripts, /removed_scripts, /setup). So far it's worked well, and left me with a useable amount of RAM.
With CLEANUP:-YES in sbopkg.conf and judicious removal of built trees and packages, building sessions into a /tmp mounted on large tmpfs also work.
Anything else? Source caches, browser caches &c.?
|
I don't think slackware-current dosnt really depend on the stuff in /var/log ..but maybe some external tools still do. For stable ..yeah, Patric moved that stuff after 14.2's release. But the way you are donig things ...creating symlinks at boot should fix that.
Anyway, another thing you can do is using something like in fstab when mounting you root partition. Not sure if it works on all filesystems but it does on ext3,ext4. Long story short, this will make the filesystem sync every 60 seconds.
To save up some memory you may wanna look up zswap
|
|
|
07-15-2019, 01:50 PM
|
#4
|
LQ Newbie
Registered: Jan 2012
Posts: 9
Original Poster
Rep: 
|
Whoa, right!
Thank you for the update and for the tips on zswap and commit=XX
Last edited by forestcreature; 07-15-2019 at 01:54 PM.
|
|
|
07-16-2019, 06:03 AM
|
#5
|
SARPi Maintainer
Registered: Nov 2012
Distribution: Slackware ARM, AArch64
Posts: 1,071
|
Quote:
Originally Posted by forestcreature
I would be interested to know if and how others have used tmpfs to reduce frequency of writes to their SD cards, the idea being to maybe prolong SD card life by writing a lot of logs and stuff that doesn't need to persist to RAM.
Anything else? Source caches, browser caches &c.?
|
No is the answer. I haven't ever tried prolonging the lifespan of any of my SD cards because failure isn't something that's happened very often for me. I guess it's just luck.
Some SD cards that I've been using for years on RPi build systems are still going strong. I only use branded, high quality, SD cards. So perhaps that makes a difference towards longevity.
|
|
|
07-16-2019, 07:01 PM
|
#6
|
LQ Newbie
Registered: Jan 2012
Posts: 9
Original Poster
Rep: 
|
Quote:
Originally Posted by Exaga
Some SD cards that I've been using for years on RPi build systems are still going strong. I only use branded, high quality, SD cards. So perhaps that makes a difference towards longevity.
|
I've read similar experiences elsewhere so maybe it's more systematic than luck.
|
|
|
All times are GMT -5. The time now is 11:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|