Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using ext3 writeback mode for better performance...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mdpye
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 102
Location: Nottingham, England

PostPosted: Thu Jul 18, 2002 5:02 pm    Post subject: Using ext3 writeback mode for better performance... Reply with quote

OK, so everybody knows that writeback mode gives better performance in ext3 and still the same level of protection as the other journalled filesystems, but how to actually enable it on your root partition seems to be less than well documented. So here it is:

You should add "data=writeback" to the options sections of any other ext3 filesystems you use in /etc/fstab, but not your root partition (/). This is because the default mode is ordered and the mode cannot be changed once mounted. Your root partition is mounted by the kernel, read-only, during boot up and remounted read-write by your init scripts. However, trying to change from ordered to writeback mode will cause the remount to fail.

Instead, append "rootflags=data=writeback" to your kernel command line (or use grub, or stick it in lilo.conf if you want it permanent). This will have the kernel mount the root filesystem in writeback mode.

You do not need to specify the mode in /etc/fstab, but you can if you wish. I don't recommend it, as it is unneccesary and if you upgrade your kernel and forget to add the parameter ( :oops: ) the boot will fail and you'll need a rescue disk to sort it.

Just sharing the results of today's googling. :)
_________________
Cheers, MP
Back to top
View user's profile Send private message
fghellar
Bodhisattva
Bodhisattva


Joined: 10 Apr 2002
Posts: 856
Location: Porto Alegre, BR

PostPosted: Thu Jul 18, 2002 6:08 pm    Post subject: Re: Using ext3 writeback mode for better performance... Reply with quote

mdpye wrote:
everybody knows that writeback mode gives better performance in ext3

hmm... really?
http://www-106.ibm.com/developerworks/library/l-fs8/
_________________
| www.gentoo.org | www.tldp.org | www.google.com |
Back to top
View user's profile Send private message
mdpye
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 102
Location: Nottingham, England

PostPosted: Fri Jul 19, 2002 9:39 am    Post subject: Re: Using ext3 writeback mode for better performance... Reply with quote

fghellar wrote:

hmm... really?
http://www-106.ibm.com/developerworks/library/l-fs8/


Interesting, but not a particularly good benchmark for real world testing. Strangely enough, from the docs and different tests etc I've seen I got the impression that data=journal was depreciated. :?

Still, the tip still applies, as it is actually how to use anything EXCEPT ordered, which is now left trailing as the slowest mode (if journal is actually fast!)...
_________________
Cheers, MP
Back to top
View user's profile Send private message
how
n00b
n00b


Joined: 29 Jun 2002
Posts: 10
Location: Norway

PostPosted: Mon Jul 22, 2002 10:34 pm    Post subject: Re: Using ext3 writeback mode for better performance... Reply with quote

mdpye wrote:

Still, the tip still applies, as it is actually how to use anything EXCEPT ordered, which is now left trailing as the slowest mode (if journal is actually fast!)...

Most of the tests I've seen indicates that it all depends on how the filesystem is used. So IMHO, the best tip would be "experiment with different options".

data=journal certainly is the most secure option, as it ensures consistency of the data on the disk at all times. It also happens to be the fastest option in a few situations. IIRC, data=ordered is also fast under certain conditions.

You should also try the noatime options (with any filesystem), so the fs metadata isn't dirtied after every access (as opposed to after every write).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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