| View previous topic :: View next topic |
| Author |
Message |
E001754 Apprentice


Joined: 01 Aug 2004 Posts: 290 Location: Paris, France
|
Posted: Tue Nov 20, 2007 8:05 am Post subject: [SOLVED] EXT3 tweaking |
|
|
Hi all,
Thinking about tweaking my filesystem, I've found that link :
http://en.opensuse.org/Speeding_up_Ext3
It's explained in here that ext3 has 3 journaling modes : "journal mode", "ordered mode" and "writeback".
Those modes are sorted by performance increase (i.e. journal mode is slower than writeback), however, journal mode is safer than writeback.
I therefore have few questions :
What does "safe" means ? I understand and accept losing data if my computer fails when writting, but is it possible to lose also data when reading (especially when launching an application or while using a game for example) ?
How can I check what mode is active on my partition ?
Thanks for your answers.
Last edited by E001754 on Mon Nov 26, 2007 3:27 pm; edited 1 time in total |
|
| Back to top |
|
 |
likewhoa Guru

Joined: 04 Oct 2006 Posts: 461 Location: Brooklyn, New York
|
Posted: Tue Nov 20, 2007 9:29 am Post subject: |
|
|
run
| Code: |
# dumpe2fs /dev/<DEVICE>|grep features
|
P.S checkout the -E options which are great for tweaking when combining extfs with a raid array. |
|
| Back to top |
|
 |
E001754 Apprentice


Joined: 01 Aug 2004 Posts: 290 Location: Paris, France
|
Posted: Tue Nov 20, 2007 3:13 pm Post subject: |
|
|
Thanks.
This gives the following
| Quote: | Filesystem features: has_journal dir_index filetype needs_recovery sparse_super
|
However, I see that there's a journal but what mode is active ? Or does "has_journal" means that I'm in "journal mode" ?
If I switch it to "writeback", will I still be in "ext3" or is an "ext3 writeback" a simple "ext2" ?? I mean, do the volume check in case of emergency will take a huge time because of no journal at all or is still more safe than ext2 ??
I'm not sure I'm clear in my questions !
Thanks anyway for the help so far. |
|
| Back to top |
|
 |
likewhoa Guru

Joined: 04 Oct 2006 Posts: 461 Location: Brooklyn, New York
|
Posted: Tue Nov 20, 2007 4:52 pm Post subject: |
|
|
you'll have to use tune2fs on the device.
| Code: |
# tune2fs -o +journal_data_ordered /dev/<DEVICE>
|
would change the default mount options on the journal file system to journal_data_ordered, this change can be seen in
| Code: | | # dumpe2fs /dev/<DEVICE>|grep mount options |
keep in mind that using journal_data_writeback may allow old data to appear in files after a crash and journal recovery.
you can switch between the mount options with the "tune2fs -o ..." flag.
I would stick with using journal_data_ordered and journal_data_writeback if you care more about performance. |
|
| Back to top |
|
 |
E001754 Apprentice


Joined: 01 Aug 2004 Posts: 290 Location: Paris, France
|
Posted: Tue Nov 20, 2007 5:34 pm Post subject: |
|
|
Thanks.
I'll try that in the next days and keep you in touch.
 |
|
| Back to top |
|
 |
Cyker Veteran

Joined: 15 Jun 2006 Posts: 1130
|
Posted: Wed Nov 21, 2007 2:59 am Post subject: |
|
|
You don't actually need to do any of that - You can just add it as a mount option in fstab, e.g.:
| Code: |
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/md4 /home ext3 noatime,nosuid,commit=30,data=journal 0 2 |
Where data=journal can be set to... whatever. See man mount for more details |
|
| Back to top |
|
 |
E001754 Apprentice


Joined: 01 Aug 2004 Posts: 290 Location: Paris, France
|
Posted: Mon Nov 26, 2007 3:27 pm Post subject: |
|
|
Thanks for all your tips.
 |
|
| Back to top |
|
 |
|