TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Operating Systems (http://forums.techarena.in/operating-systems/)
-   -   How to defrag on Linux? (http://forums.techarena.in/operating-systems/1285722.htm)

Servant 24-12-2009 04:38 PM

How to defrag on Linux?
 
Well guys i have a dual booting system. I have windows 7 installed on one partition and Ubuntu 9.10 on another partition. I was wondering whether the defraggler tool from Windows 7 can also defrag the Ubuntu partition of the hard drive. I didn't see any partitions show up in defraggler except the NTFS partitions. I know Ubuntu uses ext4 as a type of format. I wanted to know if there are any Linux defragging applications out there. There is also a scheduler for disk defragging in Windows 7 which is very nice, which is why i am wondering how to do defragmentation in Ubuntu or Linux and if there are any applications out there with features like i just mentioned to do it for me. Thanks in advance

Devasis 24-12-2009 04:50 PM

Re: How to defrag on Linux?
 
Well defragmentation is used to speed up the system. The speed is reduced usually because fragments of data are clustered everywhere without proper arrangement which is why the system takes more time to search and access the data. Well unlike the Windows filesystem, you do not need to defragment on Linux because it's filesystem's prevent the fragments from getting created in the first place. If you have used the default file system on Linux which is ReiserFS then you will never have to defragment it as long as you use it. Fragmentation itself can be limited by filesystems by finding the optimal place and guessing the file size. This is why filesystem is very important in this case and Linux takes care of that aspect.

Solomon 24-12-2009 04:59 PM

Re: How to defrag on Linux?
 
No you don't need to defrag on Linux. Also you do not exactly need to defrag on Windows 7 and Vista nowadays. It has a defrag tool which kicks in automatically. When the drive gets clustered and reached a particular percentage of fragmentation, this tool gets activated and defrags the drive. Defraggler is a weird tool and i have a not so pleasant experience with it. I had defraged with it before and it told me the drive still needed to be defragmented. I ran the tool right after defragging my drive and it still said that the drive should be defragmented. So i would suggest you not to rely on it too much for your own sake.

MrChris- 24-12-2009 05:05 PM

Re: How to defrag on Linux?
 
Well ext4 which is the filesystem in case of Ubuntu 9.10 and ext3 in previous versions of linux based operating systems are far more efficient in terms of fragmentation than NTFS. You do not need to be worried about fragments for Linux. You will still need to clean your drive though for old unused libraries. You should use localpurge though which is a very good tool for cleaning up unneeded locale files and localized man pages which might be eating up your hard drive space unnecessarily.

Calvin K 24-12-2009 05:08 PM

Re: How to defrag on Linux?
 
NTFS assigns data differently than ext4. NTFS needs defragmentation but ext4 does not so you do not have to bother about such applications for Linux. But also remember that this is not completely true and there is a bit of an exception to this as well. There is no actual need for defragmentation till the Linux based filesystems are under 70-80% of the drive capacity. But once it reaches that threshold you need to defrag it because now it is very much susceptible to it.

Lillebror 24-12-2009 05:18 PM

Re: How to defrag on Linux?
 
Well as most people here have mentioned you need to defragment for NTFS but not at all necessary in the case of ext4, that is linux. NTFs always tries to put the files as close to the start of the hard drive as possible, thus when a file grows it starts to fragment the files. In case of the other filesystem, it puts or rather scatters the files all over the hard drive which is why even if the file size increases later on then there is no issue. This is the main difference between NTFS and ext4 and why the former needs defragmentation while the latter doesn't. Hope this solves any unanswered questions you might have about defragmenting in Linux. Good luck


All times are GMT +5.5. The time now is 01:49 PM.