LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux File Optimization (https://www.linuxquestions.org/questions/linux-general-1/linux-file-optimization-758437/)

jiml8 10-01-2009 12:55 AM

Quote:

Can definitely give this a shot, it should put the files sequentially on the drive in that partition. Though, I'm still wondering if there is a process for Linux that will watch the file system access and optimize it based on that?
I am not aware of any such thing in Linux.

H_TeXMeX_H 10-01-2009 09:19 AM

Quote:

Originally Posted by jiml8 (Post 3702457)
I also wonder what would happen if you were to copy the entire contents of one partition to another drive (not an image...use the cp command...), then wipe and reformat the original partition, then copy all the files back into place. This specifically would permit the file system to reorganize the drive according to whatever scheme it considers optimum.

I have done this in the past, usually when enlarging a system partition or changing drives, and I have not noticed any particular performance improvement from doing it. However, as I say, I also have not noticed any deterioration over time, until the drive or partition is nearly full anyway.

Actually, this is one way of crudely "defragmenting" or rather "reorganizing" things on a filesystem that doesn't support such functions.

For example on jfs you can do this:
http://wiki.archlinux.org/index.php/...ragmenting_JFS

Code:

umount /dev/hdc1
dd bs=4k if=/dev/hdc1 of=/dev/hdj1
jfs_fsck /dev/hdj1
mount -o ro /dev/hdj1 /fs/hdj1
jfs_mkfs /dev/hdc1
mount -o rw /dev/hdc1 /fs/hdc1
(cd /fs/hdj1 && tar -cS -b8 --one -f - .) | (cd /fs/hdc1 && tar -xS -b8 -p -f -)
umount /dev/hdj1

But, if you replace the jfs specific commands, this should work for any filesystem.

The only thing that comes close to what the OP might want is what I mentioned earlier, "xfs_fsr" which works only with xfs filesystem.

If you really want something like the proprietary, closely guarded secret I-FAAST, e-mail them and tell them to port it to Linux (I doubt they will answer). Or, if you know exactly how it works, get a team together and try to implement it ... but in the US you may get sued for software patent infringement if they have one (which I'm sure they do).


All times are GMT -5. The time now is 05:33 PM.