![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Way Too Much Ubuntu
![]() Join Date: Apr 2005
Location: Stockholm, Sweden
Beans: 326
Kubuntu 7.10 Gutsy Gibbon
|
HOWTO: Tweak your ext3 filesystem for a performance boost
I'm using an old 900MHz Toshiba Laptop and these below changes changed my system quite noticable. You should feel an increase in video, image or audio usage.
Linux has several choices of filesystems. Two quite known filesystems are ext3 and ReiserFS. This following howto works for both those two filesystems. The ext3 filesystem provides more journaling which makes it "safer" and recovery of files in case of a crash is more likely. This has its price in performance thou. ReiserFS is a faster filesystem but with less safety. The default for ubuntu systems is ext3. Ext3 & ReiserFS has three kinds of journaling methods: 1) Journal Data Writeback 2) Journal Data Ordered 3) Journal Data I don't want to explain them to much here but the difference of the three is when the actual data is written to the filesystem in relation to the metadata and its entrance into the journal. By default the the 2nd method is used. To speed things up we will make it use method 1. The price to pay is that it may allow old data to appear in files after a crash and journal recovery. That is the last things you wrote or did prior a crash isn't recovered. (I can live with that, since I the most recent things I often have in my head and can reproduce) How to make ext3 or reiserfs use journal data writeback Code:
sudo kate /etc/fstab Code:
/dev/hda1 / ext3 defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1 Code:
sudo kate /boot/grub/menu.lst Code:
# defoptions=quiet splash rootflags=data=writeback # altoptions=(recovery mode) single rootflags=data=writeback Code:
sudo update-grub (There have been reports of problems when rebooting if the following is not done) Note! tune2fs only works for ext3. Reiserfs can't change the journal method on the fly. Before rebooting change the filesystem manually to writeback. Code:
sudo tune2fs -o journal_data_writeback /dev/hda1 Code:
sudo tune2fs -l /dev/hda1 Remove update of access time for files Having the modified time change I can understand but having the system updating the access time every time a file is accessed is not to my liking. According to the manual the only thing that might happen if you turn this off is that when compiling certain things the make might need that info. (I haven't seen a compilation that needs it yet and if I somehow come across it I will change this back or look into that then, but it is such a rare case) To change this do the following: Code:
sudo kate /etc/fstab Code:
/dev/hda1 / ext3 defaults,errors=remount-ro,noatime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1 Last edited by GoldBuggie; August 9th, 2006 at 03:34 AM.. |
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() Join Date: Dec 2005
Beans: 49
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Cool howto, but I use reiserfs.
I wonder if there is anyway to speed up reiserfs?
__________________
When things are bad, ask yourself what Gandalf would do. But when things get just right plain weird, then you need to ask: What would Skooby Dooby do? |
|
|
|
|
|
#3 |
|
Just Give Me the Beans!
![]() Join Date: Sep 2005
Location: Canada
Beans: 75
Xubuntu
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
You can apply the noatime option to your reiserfs partitions in fstab.
|
|
|
|
|
|
#4 |
|
Way Too Much Ubuntu
![]() Join Date: Apr 2005
Location: Stockholm, Sweden
Beans: 326
Kubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Well...I didn't want to mention to much about reiserfs since I haven't tried anything on it yet. I'll install it in about 2 weeks. But according to the documentation of reiserfs kernel 2.6.X the above howto should work and make it faster as well.
Not that I have not tried it but I would be happy to see someone try it before me |
|
|
|
|
|
#5 |
|
Tall Cafè Ubuntu
![]() Join Date: Jan 2005
My beans are hidden!
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Looks cool. Ill use this on non-system (storage) drives.
|
|
|
|
|
|
#6 | |
|
Way Too Much Ubuntu
![]() Join Date: Apr 2005
Location: Stockholm, Sweden
Beans: 326
Kubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Quote:
|
|
|
|
|
|
|
#7 | |
|
Just Give Me the Beans!
![]() Join Date: Dec 2005
Beans: 49
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Quote:
performance.
__________________
When things are bad, ask yourself what Gandalf would do. But when things get just right plain weird, then you need to ask: What would Skooby Dooby do? |
|
|
|
|
|
|
#8 |
|
Chocolate-Covered Ubuntu Beans
![]() Join Date: Oct 2005
Location: Fribourg,Switzerland
Beans: 2,202
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Thanks a lot, GoldBuggie...amazing difference on my system!
Happy New Year. |
|
|
|
|
|
#9 | |
|
Fresh Brewed Ubuntu
![]() Join Date: Oct 2005
Location: Helsinki, Finland
Beans: 1,350
|
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
Whoa, I knew I had damn small linux on a usb-stick for a reason.
System no more booted and gave errors "read only filesystem". Got it back running by undoing the changes but I couldn't find any typos or anything in either fstab or in menu.lst. Unless the fstab line for the filesystem needs more options than these? Quote:
Last edited by kaamos; December 28th, 2005 at 08:09 AM.. |
|
|
|
|
|
|
#10 |
|
Dipped in Ubuntu
![]() |
Re: HOWTO: Tweal your ext3 filesystem for a performance boost
I had the same problem.
Another way to rescue is to reboot into recovery mode, when it gets you to the CLI type: mount -o remount,rw /dev/hdXX / hdXX being your hard drive partition. This will allow you to edit the fstab and menu.lst to undo the chnages. Now if I could just work out what's going wrong, time for bed me thinks...leave it until tomorrow. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|