Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
August 29, 2014, 11:06:49 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 2 [3] 4
  Print  
Author Topic: Multiplatform! JKdefrag on Linux?  (Read 43359 times)
dennis
Guest
« Reply #30 on: June 14, 2007, 02:52:48 pm »

Let's say we want to write the JKDefrag for linux, after a LOT of work that may even work. Keep in mind that filesystem software or kernel software actually must not contain any bug, how would you ever convince Linus Thorvalds of merging it in the kernel source tree? Have you got an idea where you want to implement this functions, I mean, on a per filesystem basis through ioctl(...) or do you want it to be available always and then you would have it as a system call in the VFS layer or something. Indeed the movefile function will take the most effort, and when a crash occurs every piece of data must not be lost, on top of that you have to write additional code per filesystem available for linux an there are a lot!
However, XFS already supports online defragmentation and resizing, this could be a good start to port JKdefrag to the unix world.

Dennis
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7220



View Profile WWW
« Reply #31 on: June 14, 2007, 03:48:08 pm »

You're asking questions that I cannot answer. I simply don't know that much about Linux filesystems and how they work. Perhaps the needed functions are already there? Or can be simulated using calls that are already there? I don't think so, because then there would surely be dozens of defragger/optimizers for Linux already. Like I said before in this thread, I think Linux cannot be defragged because it cannot be defragged, not because it's doesn't need to.
Logged
Soichiro
JkDefrag Senior
****
Posts: 34


View Profile
« Reply #32 on: June 15, 2007, 09:31:48 am »

Quote from: "dennis"
Keep in mind that filesystem software or kernel software actually must not contain any bug, how would you ever convince Linus Thorvalds of merging it in the kernel source tree?

That's why I have a machine with a different partition for every Linux file system in order to test this. I'm not about to release a program that could potentially destroy a file system until I'm certain there are no bugs, or at least, nothing more serious than a typo in the program's interface. Tongue

Quote
Have you got an idea where you want to implement this functions, I mean, on a per filesystem basis through ioctl(...) or do you want it to be available always and then you would have it as a system call in the VFS layer or something.

ioctl() seems to be the simplest method.

Quote
Indeed the movefile function will take the most effort, and when a crash occurs every piece of data must not be lost, on top of that you have to write additional code per filesystem available for linux an there are a lot!

Yes, it's true that Linux has a lot of file systems, but most of them are fundamentally similar. The main differences that would affect defragmenting are, for example, the way ReiserFS can fit multiple files into a single allocation block.

Quote
However, XFS already supports online defragmentation and resizing, this could be a good start to port JKdefrag to the unix world.

Yes, I was planning on using the XFS defragmenter's code for a bit of reference.
Logged
robert
JkDefrag Supporter
***
Posts: 17


View Profile
« Reply #33 on: June 15, 2007, 08:02:19 pm »

Quote from: "Soichiro"
This probably won't end well... :roll:  But at least worst case scenario is I have to format a few partitions with no important data on them.  Tongue


If it's "no[t] important" how do you feel about deleting it right now?
If you don't like that perhaps you should do your testing on loopback files, oh and don't forget to backup!

Quote from: "jeroen"

Wow! No limit? Files that are not fragmented will not get fragmented. And NT is completely antiquated, you should compare with Windows 2000 or 2003.

Microsoft Windows Server 2003 vs. Linux Competitive File Server Performance Comparison.

Sorry for NT please read as all versions 4.0 to 6.0. In fact it applies more to the later v5 and v5.1 (branded as 2k and xp) versions as they have compression and encryption which are VERY bad for ntfs fragmentation. Dunno about Vista yet I've only really 'played' so far because of dodgy drivers. Yes I know files don't move on the disk if you don't touch them.
But I think we're going back over old ground now.

As for the "MS-Samba" report, well the whole "get the facts" campain was a lead ballon, the only long term effect being "Thanyou for the bug reports, Microsoft" re. the later IIS report. I think this one was attacked for using hardware that the really old versions of linux they used couldn't cope with (driver issues).

Anyway, perhaps I should have deleted that last paragraph, the only important thing to me was that Linux was faster on my hardware not some monstrosity with eight gigabit ethernet cards.
Logged
Soichiro
JkDefrag Senior
****
Posts: 34


View Profile
« Reply #34 on: June 15, 2007, 09:02:25 pm »

Quote from: "robert"
Quote from: "Soichiro"
This probably won't end well... :roll:  But at least worst case scenario is I have to format a few partitions with no important data on them.  Tongue


If it's "no[t] important" how do you feel about deleting it right now?
If you don't like that perhaps you should do your testing on loopback files, oh and don't forget to backup!

Well, I created these partitions for the sole purpose of testing the defragmenter. Of course I wouldn't like deleting them, because then I wouldn't have any partitions to test this on Tongue
Logged
RJARRRPCGP
JkDefrag Hero
*****
Posts: 55


View Profile
« Reply #35 on: June 23, 2007, 12:34:36 am »

Quote from: "jeroen"
Quote from: "DonnEdwards"
Every time I ask I'm told that Linux doesn't need a defrag program. Is this really true?

That's what I keep hearing, but I find it very hard to believe. I wonder if it's a myth, maybe everybody is repeating the same thing over and over? I'd be very interested in hard measurement data, if somebody has it!


I agree! There should be a file placement optimisation with Linux.
Logged
RJARRRPCGP
JkDefrag Hero
*****
Posts: 55


View Profile
« Reply #36 on: June 23, 2007, 12:36:38 am »

Quote from: "the Irf"
Have you tried nLite ?
http://nliteos.com/
You can change windows in many ways with nLite, see the home site
C: is about 500-600MB for me with everything I need installed.


nLite has nothing to do with defragmenting, nLite takes the extras out of Windows, but be careful, it's been known to be majorly buggy with Windows 2000, it has caused a BSOD to occur when installing Windows 2000 when IIS is selected for removal, thus nLite currently is recommended for WINDOWS XP ONLY!

If you have Windows 2000, please wait for a later version.
Logged
the Irf
JkDefrag Supporter
***
Posts: 18


View Profile
« Reply #37 on: June 25, 2007, 01:34:36 am »

Quote from: "RJARRRPCGP"
Quote from: "the Irf"
Have you tried nLite ?
http://nliteos.com/
You can change windows in many ways with nLite, see the home site
C: is about 500-600MB for me with everything I need installed.


nLite has nothing to do with defragmenting, nLite takes the extras out of Windows, but be careful, it's been known to be majorly buggy with Windows 2000, it has caused a BSOD to occur when installing Windows 2000 when IIS is selected for removal, thus nLite currently is recommended for WINDOWS XP ONLY!

If you have Windows 2000, please wait for a later version.


I was quoting Mitch 74
A computer is like air conditioning: it's a waste when you open windows

RJARRRPCGP, no problem, I have used nLite a long time, know how it works Smiley
Logged
Monty98
JkDefrag Supporter
***
Posts: 17


View Profile
« Reply #38 on: July 03, 2007, 06:07:48 pm »

I've been interested in this for awhile [linux fragmentation], but there isn't much information on the subject...

I'm not expert, but my understanding of ext3 was (given there is freespace) whenever a file is created the file system will only create whole unfragmented files and in the case of changes to files that would fragment when saving, the filesystem unlinks the old data and copies everything to a new location to create a whole file.
Logged
the Irf
JkDefrag Supporter
***
Posts: 18


View Profile
« Reply #39 on: July 03, 2007, 06:39:40 pm »

Monty98, check this out for system defrag
Paragon Total Defrag 2007 Recovery CD Image
Total Defrag defrags ext2 and ext3, fat and fat32, NTFS and few more...

Offical homepage
Total Defrag 2007
Logged
lulu135
JkDefrag Junior
**
Posts: 6


View Profile
« Reply #40 on: July 03, 2007, 07:03:56 pm »

Quote from: "dennis"
Let's say we want to write the JKDefrag for linux, after a LOT of work that may even work. Keep in mind that filesystem software or kernel software actually must not contain any bug, how would you ever convince Linus Thorvalds of merging it in the kernel source tree? Have you got an idea where you want to implement this functions, I mean, on a per filesystem basis through ioctl(...) or do you want it to be available always and then you would have it as a system call in the VFS layer or something. Indeed the movefile function will take the most effort, and when a crash occurs every piece of data must not be lost, on top of that you have to write additional code per filesystem available for linux an there are a lot!
However, XFS already supports online defragmentation and resizing, this could be a good start to port JKdefrag to the unix world.
Dennis


You could start with an off-line defragmentor that parses the ext3 structures itself.  I think there's a library called libext2.so or something like that.  I think that could be easier than messing with the kernel sources and you don't have to worry about locking and all that hard stuff.

For reliability, the ext3 journal would come in handy.  Just journal every change before doing it and the reliability problem is solved.
Logged
Soichiro
JkDefrag Senior
****
Posts: 34


View Profile
« Reply #41 on: July 04, 2007, 02:21:01 pm »

About my linux defragmentation libraries, I unfortunately haven't made much progress since I'm so preoccupied with work (among other things), but the header files for each file system (the ones outside the kernel sources) do list functions that could be put together to create imitations of Microsoft's defrag API, which is admittedly more simple than using low-level ioctl() and fcntl() calls.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7220



View Profile WWW
« Reply #42 on: July 04, 2007, 05:10:27 pm »

Quote from: "Soichiro"
the header files for each file system (the ones outside the kernel sources) do list functions that could be put together to create imitations of Microsoft's defrag API

It sound very interesting and promising! And I'm glad you haven't made much progress, because I'm extremely busy myself... It will keep.
Logged
Soichiro
JkDefrag Senior
****
Posts: 34


View Profile
« Reply #43 on: July 11, 2007, 04:16:30 pm »

Well, after looking through the very undescriptive man page for ioctl and its calls, I have determined that there is no possible way ioctl can help me with this. The file system headers are somewhat confusing as well, by forcing me to magically convert a generic file system structure to an ext2 structure and so on. And as though ioctl's man pages weren't skimpy, ext2's man pages don't even exist. Some help there. :x

Anyway, I'm making a little progress, but slowly.
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7220



View Profile WWW
« Reply #44 on: July 11, 2007, 06:47:07 pm »

Ok, thanks for the update.
Logged
Pages: 1 2 [3] 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!