LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-01-2009, 04:53 AM   #1
Manjunath1847
Member
 
Registered: Mar 2007
Posts: 44

Rep: Reputation: 16
enabling file system journal


Since fsck takes a lot of time to complete, we have disabled fsck which runs based on mount counts and duration between the mounts using tune2fs command as follows.

tune2fs -c 0 -i 0 <file_system>.

To ensure filesystem consistency even across unclean shutdowns, we are planning to enable journal to the file system using tune2fs -O has_journal option.

My question is, will enabling file journal has any performance issue. Since all the disk transaction has to be logged to journal will it not take more time?

Thanks in advance.
 
Old 09-01-2009, 10:28 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

as an easy answer, yes, enabling journal will have an impact on performance. The question is, how much in your use case.
And is this performance issue lower than the risk of loosing data.

So we all don't know anything about your system and the usage, so we will be unable to provide you with kind of advice. If we are talking about a small webserver, so fsck time will be also small. If you are running a companies file server providing 25 TB of data the fsck time can take up to 2 or 3 days.

From my point, disabling fsck is bad idea. The checks are made to prevent from data loss, so better you enable it. Also in most cases journaling does not have a measurable impact on most systems.

To get a decision point calculate what does have higher priority for your business, Data loss or little smaller IO performance.
 
Old 09-01-2009, 11:32 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Manjunath1847 View Post
Since fsck takes a lot of time to complete, we have disabled fsck which runs based on mount counts and duration between the mounts using tune2fs command as follows.

tune2fs -c 0 -i 0 <file_system>.

To ensure filesystem consistency even across unclean shutdowns, we are planning to enable journal to the file system using tune2fs -O has_journal option.
I am not sure you have the right understanding about what you are about to do. What fs are you using that is not already using journal? All the main linux fs's do use journal by default, except ext2. Are you truly using ext2?

Second, journal IS NOT a substitute for disk checking. The journal is a way to shorten fsck, but it's not a substitute for it. In fact, it's fsck the one that will replay your journal after a hard reboot to restore the fs to a properly working state, and if further checking is needed, it will be done.

Quote:
My question is, will enabling file journal has any performance issue. Since all the disk transaction has to be logged to journal will it not take more time?
Each fs performs differently for different tasks. Journaling takes a bit of cpu and can make *some* operations slightly slower, but in the contrary it will radically shorten some others, like checking and repairing the fs. It will also help to maintain the integrity of your data.



If you are truly bothered by this, I'd try using another fsck policy, but completely getting rid of it can have consequences There are ways to run fsck at shutdown instead, maybe you prefer that. I know it's possible, but never bothered with that.
 
Old 09-02-2009, 05:02 AM   #4
Manjunath1847
Member
 
Registered: Mar 2007
Posts: 44

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by i92guboj View Post
I am not sure you have the right understanding about what you are about to do. What fs are you using that is not already using journal? All the main linux fs's do use journal by default, except ext2. Are you truly using ext2?
We are using ext3. By default has_jounal is enabled. But what I am mean by enabling journal is, I am mounting the file system with journal_data enabled, in which case it add even data(not just meta data) to jornal.
 
Old 09-02-2009, 05:25 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I see, that makes more sense. You might be interested in this article.

http://www.ibm.com/developerworks/li...y/l-fs8.html#4
 
Old 09-03-2009, 08:06 AM   #6
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Rep: Reputation: 16
With journaling enabled you're already double tapping the disk. So when you mount with journal=data and do a full double write expect your 'svctm' metric to rise, but since you're already journaling, the overall performance shouldn't ( I say this from a 1000 foot view) be impacted too much beyond what you have now.

Obviously you are more paranoid about data loss than disk service times.

UPDATE: If you want to NOT impact performance or improve the mount performance, convert the ext3 to an ext2 and then re-create the journal on another file systems of equal or greater speed. This way you'll be single hitting the disk and the journal and likely GREATLY improving the performance of your main data volume and preserving the data (not just the metadata) on the independent volume.

Last edited by RaelOM; 09-03-2009 at 08:08 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux AHCI Enabling - Kernel unable to mount file system. talktoamrat Linux - Hardware 2 08-03-2009 07:42 AM
AHCI enabling -- Kernel unable to mount file system / Device un-identified. talktoamrat Linux - Newbie 1 08-03-2009 05:11 AM
ext3 file system journal error garyg007 Linux - Newbie 8 12-29-2008 07:11 PM
Accessing the linux file system journal dimitriw1972 Programming 3 03-14-2008 02:35 PM
Read-only file system after enabling/disabling root benn333 Ubuntu 2 02-25-2007 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:13 PM.

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
Open Source Consulting | Domain Registration