0

This question already has an answer here:

OS: Ubuntu 16.04 (Desktop enviroment)

HDD size: 1TB

1) De-Fragmentation: In windows it is mandatory to defreg the hdd. Otherwise system will become slow. Is it required in ubuntu or any linux destro. If yes, Kindly guide me the secured procedure.

2) Currently I am using BleachBit. Dose it take care of all the maintenance required. Or have I need to do some other stuffs.

marked as duplicate by muru, Videonauth, karel, Pilot6, Eric Carvalho Oct 19 '17 at 11:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • "In windows it is mandatory to defreg the hdd". Why do you think it's mandatory? I think it's a good practice NOT mandatory. – Shashanth Oct 19 '17 at 9:05
  • 1
    @Shashanth -- in windows it is mandatory. Fragmentation climbs quickly in windows. – ravery Oct 19 '17 at 9:15
  • @Shashanth It is more then good practice. Try to disable auto maintenance or auto defreg. And use windows pc for 2 months. you will find out why it is mandatory. Half of its performance will fall. – Aravind Oct 19 '17 at 9:30
  • @ravery Thanks for the info. I didn't know it De-fragmentation is mandatory. – Shashanth Oct 19 '17 at 9:31
  • 1
    @Aravind check this AskUbuntu thread – Shashanth Oct 19 '17 at 9:54
1

I don't use BleachBit so can't speak about it. But, I will address the fragmentation.

Two properties of the windows files system causes fragmentation:

First, Windows writes files sequentially (end to end with no space between). So if a files gets larger the new part has to written else where. Also, writing starts with the first available block, whether or not there is space for the whole file.
Second is write failure protection. When a file is saved (or resaved), the original is not overwritten. Windows writes the file to a new location, then verifies that the write was successful before deleting the original. This practice creates many "holes" in the file system.
The combination of these two causes fragmentation to grow quickly.

Ubuntu (and many other linux systems) use the ext4 file system and Smart file allocation.

Ext4 (and other journaled file systems) do not store files sequentially. Ext file systems leave space for potential file growth, and looks for blocks of free space that can hold all of the file when saving. Thus reducing fragmentation as much as possible. Partitions can be used for years and still have fragmentation under 3%.
However, this anti-fragmentation design breaks down when the drive nears capacity (80% or more) since there simply are not large blocks of free space.

e4defrag is the default utility for defragmenting ext4 file systems

Not the answer you're looking for? Browse other questions tagged or ask your own question.