Theunderlying filesystems used by Ubuntu, like ext2 and ext3, simply don't need defragmenting because they don't fragment files in the same way as NTFS. There are more details at ext3 - Wikipedia, the free encyclopedia
Fragmentation is the product of writing files in the first available open blocks on a drive. Over time, as files get created and deleted, small sections of disk open up, which causes newly written files to be split over several such openings. This can reduce performance, although it was much more of a problem in the past with slow hardware and slow disks.
The default filesystem in Ubuntu, ext4 (and until recently, ext3) are designed to limit fragmentation of files as far as possible. When writing files, it tries to keep the blocks used sequential or close together. This renders defragmentation effectively unnecessary.
Whenever I install Linux on a box that has Windows, and I want to dual boot, I always defragment the hard drive as much as possible before resizing the partition. Is this just superstition, or is it actually a good idea?
If your hard drive is already defragmented with all the data at the start of the disk, then it makes resizing the partition easier. Long ago the partition resizing tools were not able to move the data, so it was a requirement.
Today if you hard drive is not already defragmented then there is no reason to defragment it first in an attempt to move the data to the front of the drive since the resize utility will do that automatically. All you are doing is shifting the effort from the resize utility to the defrag utility. The only reason that is advantageous is if your defrag utility has a better progress indicator and gives you the ability to restart when your resize utility does not.
I believe it depends on disk partition software that you use as some do a better job of it than others. The vendors themselves will be able to tell you if it is necessary for their particular software and also advise on any best practises.
Ideally you would want a hard disk per operating system. That way the core OS is installed at the start of each drive which will have the quickest access time. If you have a 1.5TB drive that's got 1TB of Windows and Music on it and you for example stick Linux on the spare 0.5TB then its bound to run slower given the nature of how hard disks work. They are after all still using moving parts to read the various platters of the hard disk.
I suppose the ideal solution if money was no object would be to use solid state disks, they shouldn't in theory need de-fragging much as the seek times of some of the quicker SSD drives is about the same when full or empty.
It depends. Some defraggers might scrunch everything at the start of the partition, but most like to spread data across the whole disk. That way, there tend to be free fields in between blocks, so extending a file to a new block will not fragment the filesystem as quickly.
I think it depends on how the defragmenter works. There's a freeware defragger called jkdefrag that purports to optimize the drive for better access time first, but I don't know how that might interfere with a particular partitioning scheme (i.e., optimizing the position of files in a partition of size A would probably not be optimal as you're resizing it for partition size B) so you may not see much improvement.
If you intend to put Linux on a new partition then like others have said you will need to get all the data as far forward as possible. GParted will only let you shrink the existing NTFS volume/partition to the last block that holds data. Perfect Disk has a 30 day demo and has the ability to compact the data to the front of the drive. I also believe that the free opensource defragger may have a script to do the same.
If you have enough space on your hard drive, you can use Gparted to defrag your file system (ext2, ext 4, nfts, etc.). You have to boot from a CD/DVD/USB boot disc because the drive you're working on has to be unmounted. You also have to have more unused space available than used space for this to work and it may take a while.
If you aren't confident about having an EXT4 Partition on your OS drive, simply go HOME and type df -T. Look to see what your sda* partitions are set to (try this in 14.04LTS, and you'll see EXT4 unless you chose another partition type upon harddrive setup).
Well that's for Windows because the way it writes files it breaks them all up, OS X doesn't do that on small files, so it eliminates the need for MOST users to require a regular defrag. Perhaps once every few years after many updates, upgrades, program installs and reinstalls may one require it on a Mac, then rarely again.
I outlined a safe way here that always gives you a bootable backup to check, plus it really optimizes the hard drive in the process. Also it stays optimized and faster longer when defragging software tends to require it again and again to regain the performance.
If you have Filevault enabled this procedure will not work because it's one giant encrypted image, this is designed to acquire it's results by copying the parts of files into one piece again and back into a alphabetical order according to the root level directory for optimal results, especially of fast loading of Applications into memory.
3: Hard drives are fastest at the beginning of the drive. and slowest at the very end. Data is first written on the top of the drive and works it's way down. However data doesn't magically move up to take available space, holes can develop with a lot of reads and writes. Also things can get out of order, the heads have to travel further all over the drive to boot or load programs for instance.
4: The first 50% of the drive is faster than the second 50% due to more sectors in each track which the heads have less to move and can gather more data at one time. So preferably if you can contain yourself to the first 50% of a hard drive, it will perform fast forever.
I always get twice as much boot hard drive space as I'm ever going to need, I can always partition the unused space and use it as a backup clone for on the road, or rare used items, emergency storage etc.
6: If one wants to create a Bootcamp or second partition on the boot drive, there might be OS X data near the bottom where the second partition will go, it's sometimes not easy to move this data further up on the drive.
Unfortunately the only way to remedy this is by backing up users data off the drive to a external storage drive (not TimeMachine or clone) and then using Disk Utility to Erase with Zero (Security option or move slider one space to the right) the entire drive (10.6) or the Macintosh HD partition (10.7 or later) then reinstalling OS X fresh, followed by programs and return of verified user files.
8: I don't advise using defragmentation software on a "live" system, it's dangerous and if it messes up your stuck. If anyone has defragged a PC before knows it's never really completes in actuality, but this method I have here will do so wonderfully. ?
So my solution is if your serious about performance, have large files like video that stretch across many sectors and want it in one piece, want to reduce bad sectors that can corrupt large and even small files, need to free up space for a partition or large file.
1: Reduce your boot drive user content (files, try movies first) so it's less than 50% of the drive filled (ideal) but never more than 80% filled as a full boot drive will make the computer not boot up.
2: Use a blank powered external drive (formatted GUID and OS X Extended Journaled in Disk Utility) and a copy of Carbon Copy Cloner to clone the OS X boot partition (aka Macintosh HD) to the external drive using the default settings and a full clone.
3: Then reboot the machine holding the option/alt key down (wired or built in keyboard), you can now boot from the clone using Startup Manager. Test the clone out for some time so your positive it's solid and reliable, catch any unknown issues (I haven't heard of any) and alleviate any fears you may have.
4: While booted from the clone, use Disk Utility to Security Option > Erase with the "Zero" or second secure selection (on 10.7/10.8) the internal OS X boot partition (Macintosh HD), or the entire drive if there is no Recovery or Bootcamp partition (10.6 users) this will "Zero" out all the bits, and when it reads it back for confirmation, map off any bad sectors in the process, never to be written to again. It will take some time and it's a very worthwhile step as failing sectors take longer to read from than perfect ones.
Note: You only need to do this once per drive, you might have to Erase Free Space > Zero perhaps one more time in the next year, but that should be it. Provided you don't move the computer/hard drive while it's operating (a big no no!)
5: When completed, reverse clone. the external onto the internal partition. Run Disk Utility > Repair Permissions on both and all the OnyX (Macupdate.com) maintenance and cleaning aspects and reboot. OnyX cleans out the caches and lets them rebuild.
You will solve your Bootcamp partition formatting problem, your bad sectors problem, your defrag problems, corrupt or bloated caches and your optimization problems all in one batch. Also have a working bootable backup in the process which is loads safer than a live defrag.
Your OS X system files will be written next, followed last by your User account data last which tends to grow, expand and contact, suffer with more changes so the defragmentation that occurs will occur at the end and into the slower sections of the hard drive, not where Applications and System are.
Note: If this doesn't work to improve your performance, you likely don't have enough RAM, or the OS X version is to new/bloated for your hardware or perhaps some other issue like a failing hard drive. See this and perhaps it will assist in narrowing down the cause.
After analyzing the disks I press the Run button, it shows as if I have pressed (it changes color while I press it) but nothing happens, Bitdefender doesn't go to the next screen. I just installed it.
3a8082e126