LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   s it worth it to disable journaling to preserve a flash drive? (https://www.linuxquestions.org/questions/linux-newbie-8/s-it-worth-it-to-disable-journaling-to-preserve-a-flash-drive-4175521737/)

ferite 10-10-2014 08:27 PM

s it worth it to disable journaling to preserve a flash drive?
 
Hi.

I am applying some tweaks to my system in order to expand the life expectancy of the Flash drive where the OS is installed (eMMC card, that is a kind of SD, it has wear leveling). These include disabling swap, using noatime flag for / partition and mounting '/tmp', '/var/log', '/var/tmp' on memory.

Now the last recommendation I have found is to disable journal. But the system has to have the best resistance to power failures as possible. So I am not sure if it worths to disable the feature that makes ext4 recoverable when there is a power outage, only to avoid (some or many?) writes to memory.

It is a headless system, that has a main application that updates a text file, say once per minute. Other than this, the system only should run the daemons installed with an Ubuntu minimal install.

Thanks.

sgosnell 10-10-2014 09:40 PM

Considering the cost of flash cards, and the potential cost of a system crash, I don't think it's worth it. The card will be long obsolete before it's worn out by writes anyway,

frankbell 10-10-2014 10:11 PM

I have heard persons recommend not putting /swap on flash drives because of the number of writes, but I've not heard anyone recommend disabling journaling. Given the usefulness of journaling in case of a system crash, I would be reluctant to disable it.

ferite 10-11-2014 11:31 AM

Quote:

Originally Posted by sgosnell (Post 5252146)
Considering the cost of flash cards, and the potential cost of a system crash, I don't think it's worth it. The card will be long obsolete before it's worn out by writes anyway,

Unfortunately is not so easy. Although the memory I am using to store the OS is for many means like an SD card, it is a onboard chip. It means that when it is out, the motherboard will be out too. Because of this, I am doing my best to preserve it.

Quote:

Originally Posted by frankbell (Post 5252157)
I have heard persons recommend not putting /swap on flash drives because of the number of writes, but I've not heard anyone recommend disabling journaling. Given the usefulness of journaling in case of a system crash, I would be reluctant to disable it.

I am thinking the same. But I would like to get some correlation between the intensity in which applications save files, and the journal activity, so I can at least get some approach to the life span of the eMMC memory.

jefro 10-11-2014 04:56 PM

All ssd's go bad. They all slow down sooner than you'd like. They are kind of a bad choice for many things.

If you have to protect the system you have no choice but to implement some form of data protection by either filesystem of some kind. It may be possible to run some form of OS in ram on boot so that your drive is maybe used less. It would be writes or changes.

May be possible to write changes to other media also like remote iscsi.

A good quality ssd ought to do OK for a few years I'd think under normal use. In a simple few text edits, it might last 10 years.

DavidMcCann 10-12-2014 11:05 AM

I've had the journaling come to my rescue on several occasions over the years, so I'd never even thing of disabling it.

jailbait 10-12-2014 12:06 PM

If you disable journaling and then have a system crash that does not mean that the system cannot recover the file system. The system will run fsck against the entire partition. This will result in a lot of reads on the SSD. perhaps a few writes, and will be very slow.

------------------------
Steve tites

ferite 10-14-2014 04:47 PM

Thanks jefro, David and jailbait for your comments.

As jefro said, I think the best way to make the system as power failure resistant as possible, and do not worry about wearing the Flash storage, is boot to RAM. After my research I think the best way to load the system to RAM on boot is by applying this script.

As usual I would appreciate if there is any thought on this matter.

keefaz 10-14-2014 04:59 PM

The system always boots to ram, no? (goes from storage device to ram)

ferite 10-14-2014 06:01 PM

Quote:

Originally Posted by keefaz (Post 5253819)
The system always boots to ram, no? (goes from storage device to ram)

@keefaz. If you refer to my last message, I forgot to insert the link to the thread I was trying to point. By running this script (once) you can make a "standard" Ubuntu system always creates a RAM filesystem. The only directory mounted from the real storage device is /home, so all things you save there are persisted.

jefro 10-14-2014 10:16 PM

Some ssd's offer built in ways to protect data also.


All times are GMT -5. The time now is 11:54 PM.