Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] EXT3 tweaking
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 431
Location: Paris, France

PostPosted: Tue Nov 20, 2007 1:05 pm    Post subject: [SOLVED] EXT3 tweaking Reply with quote

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 8:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 695
Location: Brooklyn, New York

PostPosted: Tue Nov 20, 2007 2:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 431
Location: Paris, France

PostPosted: Tue Nov 20, 2007 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
likewhoa
l33t
l33t


Joined: 04 Oct 2006
Posts: 695
Location: Brooklyn, New York

PostPosted: Tue Nov 20, 2007 9:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 431
Location: Paris, France

PostPosted: Tue Nov 20, 2007 10:34 pm    Post subject: Reply with quote

Thanks.

I'll try that in the next days and keep you in touch.
:D
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1427

PostPosted: Wed Nov 21, 2007 7:59 am    Post subject: Reply with quote

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
View user's profile Send private message
E001754
Guru
Guru


Joined: 01 Aug 2004
Posts: 431
Location: Paris, France

PostPosted: Mon Nov 26, 2007 8:27 pm    Post subject: Reply with quote

Thanks for all your tips.

:D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum