[opensuse] KDE4 startup optimization [WAS: defrag]
On Mon, Feb 15, 2010 at 12:02 PM, Lubos Lunak <l.lunak@suse.cz> wrote:
On Monday 15 of February 2010, James Knott wrote:
Lubos Lunak wrote:
As demonstrated also in this thread, there is a widely accepted myth that defragmenting is completely useless with Linux, and as such nobody has been really bothered enough to write any reasonably usable generic tool.
Given that modern file systems are fragmentation resistant, please explain how fragmentation is a problem on Linux.
Interesting, but not quite the same thing as defrag. The below is re: <http://markmail.org/message/qp7zjhhdzxum7rfn> which describes some proposed ext4 kernel patches at a very high level. Ted Tso, the ext4 maintainer, proposed a year+ ago that ext4 needed to grow 3 ioctls that work together. One would restrict the block range used for specific files. Seems like it would be useful for the kde4 startup use case. The idea is that you could from user space make ioctl calls on a per file basis that would cause those files to prefer to be allocated from a restricted range of blocks. Assuming this existed the process for kde4 would be: 1) Loop through all kde4 startup related files and set their preferred block range to be relatively small and in an unused portion of the drive. ie. The block range needs to have enough free blocks to hold the files. 2) Run the e4defrag tool. It would need to grow the intelligence to "defrag" a file just because it is in the wrong block range, but that is not all that hard. Ie. e4defrag already reads the block map to determine if a file is fragmented before it bothers to defragment. So this just adds a check to verify a files blocks are in its preferred block range. 3) All done. If the kde4 devs could determine the exact best layout of the files on disk they could enhance step 1) to be very exact in the file placement. Ie. Place file1 first, immediately followed by file2, etc. Also, Ted Tso has proposed the ext4 needed a global avoid ioctl call as well. In the above scenario it would be used in advance to clear out a block range for dedicated kde4 use. ie. Clear our 50 MB of continguous blocks as step 0, then move the kde4 startup files in there as described above. ==> ext4 patch status for the above 2 proposed features To the best of my knowledge no one is working on the "avoid block range" patch, but if they are I would guess it is Akira Fujita. He wrote the e4defrag tool and the kernel patch that allows ext4 to move data from one set of data blocks to another. (The only one of 3 complementary patches to go into ext4 yet.) As to the "prefer block range xxx-yyy for this file" patch, the OHSM team has a preliminary version of that patch in their tree. See <http://ohsm.sourcefourge.net>. Their userland use case is pretty different than the above, but the patch itself should be generic enough for both situations. I'm part of the OHSM team and I can say that we don't really have any pride of ownership in our patch. We wrote it just because no one else stepped up to the plate and did so. So if someone wanted to take what we have and go through the process of cleaning it up and getting it submitted to the Ted Tso and company, that would be great. Otherwise, I suspect the ohsm team will try to do that in the next 6 months or year. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (1)
-
Greg Freemyer