LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Does a Linux system get fragmented when 20% or less is free (https://www.linuxquestions.org/questions/linux-general-1/does-a-linux-system-get-fragmented-when-20-or-less-is-free-517548/)

nx5000 01-10-2007 12:28 PM

OK once again just for fun
"Stop thinking like windows"
There is not only ONE filesystem for linux. There is a common Filesystem mechanism called VFS but it doesn't do the real allocation, its just a pointer array.

So which filesystem?

Because there are definetly some linux filesystems that suffer from fragmentation, the most known being jffs which is used a lot in embeded environment.

shorty943 01-10-2007 05:56 PM

Quote:

Originally Posted by nx5000
OK once again just for fun
"Stop thinking like windows"
There is not only ONE filesystem for linux. There is a common Filesystem mechanism called VFS but it doesn't do the real allocation, its just a pointer array.

So which filesystem?

Because there are definetly some linux filesystems that suffer from fragmentation, the most known being jffs which is used a lot in embeded environment.


A very big thank you nx5000, for your support. Just for the fun of it. Not funny how some folk are difficult to inform.

There are now 2 people in this forum, who have found a new friend in the world at large.

Shorty943.

Sepero 01-10-2007 07:06 PM

HGeneAnthony, the problem is that you haven't clearly stated your question. I will attempt to clearify it, then answer it.

"Why does Linux not become badly fragmented like Microsoft systems?"
Because Linux places the files on the disk intelligently, instead of simply placing them in the next free spot. It leaves some 'padding' at the ends of many files, incase you write more to that file later. This allows the files remain in one piece.

Matir 01-11-2007 12:45 PM

Each filesystem type uses its own file-placement algorithm. FAT had a VERY simple algorithm: fill each hole in the partition as it went along. This, unfortunately, led to high fragmentation. NTFS does a little better, but still has fragmentation issues.

Linux filesystems reduce fragmentation. They begin by overallocating (when space is available) and reserving a few blocks past the end of a file for future expansion. They also don't usually allocate blocks on disk when a file is opened for writing, but rather when it is closed and the file's size is known. (Exceptions: if the disk is mounted with the 'sync' option or if the sync() system call is used to force flushing buffers to disk)

Some of the filesystems will reallocate fragmented files on their next use if space is available, but not all, and not always. Thus, if fragmentation has occured, it will sometimes remain behind.

If you don't run your disk at >90% full, I would not have any concern about fragmentation.

Sepero 01-11-2007 06:48 PM

After searching sourceforge.net and freshmeat.net, I found the 'shake' defragmenter. Of Linux defragmenters, it appears to be the only one that's maintained.
http://freshmeat.net/redir/shake/649...homepage/shake

tomtechguy 01-12-2007 11:07 PM

A quick Googleing on ext3 and fragmentation.

http://www.itworld.com/Comp/3380/nls...929/index.html


All times are GMT -5. The time now is 08:29 AM.