LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-10-2014, 09:27 PM   #1
ferite
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
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.
 
Old 10-10-2014, 10:40 PM   #2
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
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,
 
Old 10-10-2014, 11:11 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,361
Blog Entries: 12

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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.
 
Old 10-11-2014, 12:31 PM   #4
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sgosnell View Post
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 View Post
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.
 
Old 10-11-2014, 05:56 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,398

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
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.

Last edited by jefro; 10-11-2014 at 05:57 PM.
 
Old 10-12-2014, 12:05 PM   #6
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,166

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
I've had the journaling come to my rescue on several occasions over the years, so I'd never even thing of disabling it.
 
Old 10-12-2014, 01:06 PM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
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
 
Old 10-14-2014, 05:47 PM   #8
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
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.

Last edited by ferite; 10-14-2014 at 06:56 PM.
 
Old 10-14-2014, 05:59 PM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,387

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
The system always boots to ram, no? (goes from storage device to ram)
 
Old 10-14-2014, 07:01 PM   #10
ferite
Member
 
Registered: Jul 2014
Posts: 30

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
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.
 
Old 10-14-2014, 11:16 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,398

Rep: Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207Reputation: 2207
Some ssd's offer built in ways to protect data also.
 
  


Reply

Tags
flash cards, journal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Arch linux as Mac Time Machine server - write access disable journaling failing psycroptic Linux - Hardware 7 04-10-2014 02:26 AM
[SOLVED] Linux services - disable startup but preserve the kill guna_pmk Linux - Server 4 10-24-2013 12:32 PM
disable journaling on ext3 Andrastus Linux - Hardware 11 02-02-2010 07:08 PM
ext3's journaling optimizes hard drive head motion? i.you Linux - Software 1 10-05-2006 09:55 AM
ext3's journaling optimizes hard drive head motion i.you Linux - Kernel 2 10-04-2006 06:53 AM


All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration