Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Tips, Tricks & Tweaks Tips and Solutions for SUSE Linux
(Please do not post questions here)

 
Page 1 of 3 1 23
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-Jan-2007, 14:57
John Markh
Guest
 
Posts: n/a
Thumbs down

This is now a WIKI page: http://en.opensuse.org/Speeding_up_Ext3 -- andrewd18

Every "journaling" file system (Etx3, XFS, JFS, etc.) uses journals to recover data in case of crash. As you can clearly see, this could slow down your system.
Ext3 (and maybe others) filesystem has 3 journaling modes:
  1. Journal Data Writeback
  2. Journal Data Ordered
  3. Journal Data
By default, Ext3 uses mode 2. What we want to do is to switch it to mode 1 which is more faster and less safer. The drawback is that in case of crash, you only might lose some date you wrote.
OK, let's start working...
Open terminal and perform everything as root
Code:
su
Modify /etc/fstab
Code:
gedit /etc/fstab
Modify mounted partition by adding data=writeback
Code:
/dev/hda2************/********************ext3****** acl,user_xattr,data=writeback********1 1
Modify GRUB menu file (if you are booting from Ext3 partition)
Code:
gedit /boot/grub/menu.lst
Add data=writeback (bold) flag
Code:
kernel /boot/vmlinuz-2.6.18.2-34-default root=/dev/hda2 data=writeback vga=0x314 resume=/dev/hda1 splash=silent showopts
Change journaling mode manually to writeback
Code:
tune2fs -o journal_data_writeback /dev/hda2
Check if your partition is still running
Code:
tune2fs -l /dev/hda1
And finally, reboot your system
Code:
reboot
  #2 (permalink)  
Old 15-Jan-2007, 03:55
Darkelve
Guest
 
Posts: n/a
Default

Very interesting!

Just curious: does Yast have a module for this perhaps?
  #3 (permalink)  
Old 15-Jan-2007, 04:23
John Markh
Guest
 
Posts: n/a
Default

In a matter of fact, yes.
It is possible to perform the same actions through "Partitioner" module (in System tab).
  1. Open "Partitioner" module
  2. Click "Yes" ONLY if you are know what are you doing!
  3. Select the partition you want to modify (have to be EXT3 partition) and click "Edit"
  4. Now, click on "Fstab Options"
  5. In "Data Journaling Mode" list select "Writeback" and click "OK"
  6. Click OK to close partition properties and apply if you don't want to change anything else
  7. Open "Boot loader" module (in the System tab) if you boot from partition you have modified
  8. Select it and click "Edit"
  9. In the "Optional kernel command lineparameter" add data=writeback
  10. Click OK and Finish
That's it, you are done.
P.S.: You probably would like to verify the partition settings are working before you reboot the system....
  #4 (permalink)  
Old 15-Jan-2007, 04:25
Darkelve
Guest
 
Posts: n/a
Default

Thanks alot! I might try it this week.

How noticeable is the speed improvement normally?
  #5 (permalink)  
Old 16-Jan-2007, 03:02
John Markh
Guest
 
Posts: n/a
Default

Quote:
Thanks alot! I might try it this week.

How noticeable is the speed improvement normally?
[/b]
Let's put it this way, YOU WON'T BELIEVE IT!
I mean, I was using XFS for a long time and decided to give EXT3 a chance. It was sooo slow compare to XFS.
This little teak, bring it to reasonable speed hard drive suppose to work...
And the beauty is, the change is EXT3 I proposed is more or less the same to what is used in XFS by default.
  #6 (permalink)  
Old 19-Jan-2007, 14:41
Darkelve
Guest
 
Posts: n/a
Default

Well, I only noticed a *little* speed improvement at first, perhaps that is because I've 1GB of ram which makes things easier for the OS... UNTIL I had to copy over a 170MB file to my Linux partition. It litterally FLEW! Nice, and thanks for the tip
  #7 (permalink)  
Old 19-Jan-2007, 15:34
John Markh
Guest
 
Posts: n/a
Default

Well, there are some other tweaks that can be made:
  1. Access Time - Disable updating file/folder access time (it is more or less useless in anyway)
  2. Block Size - Reduce block size (to use disk space more efficiently)
But, since the improvement is not so segnificant and most of PCs have enough disk space, they are irrelevant.
  #8 (permalink)  
Old 20-Jan-2007, 05:15
Darkelve
Guest
 
Posts: n/a
Default

Don't misunderstand me, I'm happy with the tip you gave me
  #9 (permalink)  
Old 22-Jan-2007, 14:35
Doctor X
Guest
 
Posts: n/a
Default

Quote:
Well, there are some other tweaks that can be made:
  1. Access Time - Disable updating file/folder access time (it is more or less useless in anyway)
  2. Block Size - Reduce block size (to use disk space more efficiently)
But, since the improvement is not so segnificant and most of PCs have enough disk space, they are irrelevant.
[/b]

how access time changed? tune2fs?
  #10 (permalink)  
Old 22-Jan-2007, 16:29
John Markh
Guest
 
Posts: n/a
Default

Quote:
how access time changed? tune2fs?
[/b]
Easy...
First of all, I would like to give some background info and then to write step by step guide how do disable access time flag modification.
What most people don't know, that every time system access file (any file), it updates a field in meta data (ignore this word if you have no idea what I'm talking about) to indicate latest access time. To most of us, this information is not needed, so we can 'safely' turn off this function.

Open terminal and perform everything as root
Code:
su
Modify /etc/fstab
Code:
gedit /etc/fstab
Add noatime to the flag list of selected partition. In my case it is /dev/hda2
Code:
/dev/hda2************/********************ext3****** acl,user_xattr,noatime,data=writeback********1 1
Remount the partition (or just restart the server)
Code:
mount -a
That's it, you are done.
 
Page 1 of 3 1 23

Bookmarks

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2