LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-07-2005, 06:02 PM   #1
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Rep: Reputation: 30
Filesystem Question


hey gang,

I've been using linux for a little while now, and occasionally boot back into winblows to play a game or two and thats it.. I remember running through a quick system defrag in winblows to keep performance up after patching World of Warcraft then the thought came to me... Does linux need the occasional defrag to keep things runnning quickly?

anyone care to answer this quick question? my current filesystem is the reiserfs
 
Old 08-07-2005, 06:14 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 67
The FAT filesystem employed by Windows has a rather nasty tendency to become fragmented, and doesn't perform very well at all when it does.

ReiserFS and ext2/3 filesystems are much harder to fragment, although it's not strictly impossible if they get very full. fsck will tell you how fragmented the filesystem is. If you do want to defragment, then the only option is to move all the files off the partition onto a different filesystem and then back onto it again, but I've never heard of anyone actually having to do this.
 
Old 08-08-2005, 06:59 AM   #3
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
Does anyone knows WHY this is? What is the actual difference between fat (and ntfs?) and extX/reiser that makes the latter run smooth without a defrag?
 
Old 08-08-2005, 10:07 AM   #4
celticgeek
Member
 
Registered: Jul 2005
Location: Lothlorien
Distribution: CentOS 4.4, currently
Posts: 30

Rep: Reputation: 15
Fragmentation

The reason that extX/reiser file systems run smoother without fragmenting is not in the filesystems, it is in the way the operating systems save files. If you enlarge a file in Windows and resave it, Windows will put the additional information someplace in the file system, but not necessarily with the original file. This is what causes fragmentation.

UNIX and GNU/Linux systems keep the file and its additions together in one place when they resave the file. This eliminates (mostly) fragmentation, because the file is contiguous on the disk.
 
Old 08-08-2005, 02:21 PM   #5
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
Isn't that slowing the "enlarge-process" down? Since the kernel will have to move every bits one step to make room for some extra bit, won't it be slower then?

I still see how this works better but I just wonder if there is any difference in performance.

Thanks for the info!
 
Old 08-08-2005, 02:35 PM   #6
celticgeek
Member
 
Registered: Jul 2005
Location: Lothlorien
Distribution: CentOS 4.4, currently
Posts: 30

Rep: Reputation: 15
Fragmentation

In general, making sure that file entire file is in one place on the hard drive does take longer, and slows down the response a little. However, unless the file is really large, it does not take that much extra time. What the GNU/Linux operating system does is to just save your entire file in the first available space on the hard drive that can hold all of it, and updates the physical location information.

You get that time back when you open the file again, because the operating system does not have to search all over the hard drive to find all of your file. It can just go to the physical location once and get your file.

What slows down the Windows operating system is when you have a large file with little pieces of it scattered all over the hard drive. Windows then has to find and go to each physical location of each piece of the file to get it. This is why fragmentation can slow down your computer's response.
 
Old 08-08-2005, 08:30 PM   #7
mohit dhawan
Member
 
Registered: Mar 2005
Posts: 92

Rep: Reputation: 15
wikipedia filesysytem
 
Old 08-08-2005, 08:44 PM   #8
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,377

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
Even in Windows, the net-effect of fragmentation is much less of a practical speed-problem than it used to be. Not only have disk drives gotten considerably faster and smarter, but the disk I/O scheduling algorithms in current versions of Windows are considerably improved.

"Defragmentation" is not something that you routinely have to do with any Unix/Linux filesystem, or for that matter with Windows' NTFS. Even though it certainly sold a lot of copies of Norton Utilities, its practical impact on system performance is by now very slight.
 
Old 08-09-2005, 01:19 AM   #9
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
Thanks so much for all the info. It has really been informative.

How much have Microsoft improved the filesystem with NTFS? Does NTFS work better, needing less defragmentation? Is NTFS journal keeping? Are the guys at Microsoft working on an improvment for NTFS or a new filesystem or something like that? I would like to see how much they are going to borrow from extX/reiser in their next filesystem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ext3 filesystem question chrisk5527 Linux - General 3 01-04-2004 03:24 PM
Filesystem at 100% but not full question Blinker_Fluid Linux - General 5 12-17-2003 02:44 PM
Filesystem question log Linux - General 5 06-13-2003 02:13 AM
question about filesystem setup ..... purpleburple Linux - General 1 07-04-2002 12:23 PM
Filesystem Hierarchy Question - You probably get these alot. Sorry :( JoeLinux Linux - Newbie 4 04-23-2002 09:33 AM


All times are GMT -5. The time now is 06:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration