Questions tagged [defragmentation]

The process of arranging blocks on the filesystem to optimize disk read access.

Filter by
Sorted by
Tagged with
5 votes
1 answer
193 views

I observe using `dd if=filein of=fileout` lead to filesystem fragmentation, what do I have to change?

There was a nice question that sadly got deleted while I was writing a rather extensive answer :( Not wanting to let that effort go to waste, let me paraphrase that question from the question text and ...
user avatar
1 vote
0 answers
110 views

How to get a Btrfs filesystem fragmentation count?

The btrfs check command output doesn't mention how many files are fragmented like e4defrag -c or e2fsck with ext4 filesystems. What command can give the number of fragmented files on a whole Btrfs ...
user avatar
  • 11
1 vote
1 answer
101 views

Effects of copy (cp) vs cut (mv) on file systems

When you have to move a file to a different location in the same file system, you have two options: just cut-paste (or mv), or copy-paste (cp) and then delete the old copy. I'm wondering what are the ...
user avatar
  • 111
1 vote
1 answer
281 views

Identify if IO bottleneck is read or write

I use ddrescue to image failing disk to sparse files - often the files become highly fragmented (>50k fragments). I suspect that sometimes the imaging speed degrades because of the fragmentation. Is ...
user avatar
2 votes
0 answers
249 views

Simultaneous copy from multiple sources without fragmenting destination

I regularly need to copy large datasets from multiple smaller drives to a larger one. Lately I've been using a WD Easystore 12TB External USB 3.0 Hard Drive as my destination. Copying all the files ...
user avatar
  • 303
0 votes
1 answer
364 views

How can I disable ext4's automatic defragmentation?

I'm running tests that require some files to be heavily fragmented. I came up with a method to generate fragmented files, but something is working in the background to defragment them. I'm using ...
user avatar
  • 293
2 votes
1 answer
259 views

Does BTRFS's compress logic apply when defragmenting?

When mounting a BTRFS filesystem with the compression option, BTRFS will selectively compress files depending on whether they are deemed compressible or not. Does this same logic apply when ...
user avatar
  • 297
1 vote
0 answers
71 views

Completely defragmenting a FAT32 filesystem [duplicate]

Is there any Linux tool that allows defragmenting a FAT32 filesystem not on a best effort basis, but so that all files are guaranteed to be stored contiguously with no exceptions? Possibly writing the ...
user avatar
  • 27
5 votes
1 answer
2k views

Understanding main memory fragmentation and hugepages

I have a machine that is intended for general use and which I also used to run a QEMU virtual machine. Because the virtual machine should be as performant as possible, I want to back the VM memory ...
user avatar
2 votes
2 answers
110 views

Switching from Win10 to Linux: AV, defrag, disk cleanup tools, etc [closed]

I installed Linux Mint on my desktop in place of Windows 10. I am used to having virus/malware Scanners, defragmenters, Disk Clean up tools etc. I was wondering if people here would be able to ...
user avatar
  • 51
8 votes
1 answer
3k views

How to cause the kernel to compact fragmented memory

I am running Fedora 26. This is for a very strange assignment given by my algorithms professor. The assignment says: Memory fragmentation in C: Design, implement, and execute a C-program that ...
user avatar
  • 83
-1 votes
1 answer
84 views

Do rolling releases inevitably cause higher fragmentation over time than point releases? [closed]

Let's compare Debian Stable as a candidate for point releases and Arch Linux as a candidate for rolling releases: Does a rolling release by default cause higher fragmentation on the drive than a ...
user avatar
  • 946
2 votes
1 answer
333 views

How to defragment files in size less than 100MB only in ext4 filesystem

I have a very basic idea: I would like to defragment files in size less than 100MB only in ext4 filesystem. Since there is no option for that in the defragmentation tool (e4defrag), any ideas how I ...
user avatar
0 votes
1 answer
56 views

How to filter out only fragmented files from the log?

Supposing I have just finished a defragmentation on ext4 file system on a HDD: sudo e4defrag -v / > ~/defrag-2017-11-05 2>&1 & Which is most probably unnecessary, but I wanted to see, ...
user avatar
12 votes
2 answers
10k views

btrfs — Is it dangerous to defragment subvolume which has readonly snapshots?

If you open the defragment section of btrfs-filesystem(8), you will see the following ominous inscription left by the developers: Warning: Defragmenting with Linux kernel versions < 3.9 or ≥ 3....
user avatar
0 votes
1 answer
98 views

Are there any utilities to know where a file is physically present in the hdd? [duplicate]

I am on Debian testing and using ext4 and ntfs . while ext4 has been brilliant in recovering lost data sometimes it also discards some pieces when electricity goes for a long time or any such similar ...
user avatar
  • 10.9k
1 vote
1 answer
349 views

Add & execute package to Defrag a fragmented Ext3 Volume under BusyBox in Synology CS407? How?

Add & execute package to Defrag a fragmented Ext3 Volume under BusyBox in Synology CS407? How? Note: Debunking the myth of Linux Filesystems not getting fragmented. http://www.webupd8.org/2010/...
user avatar
  • 169
2 votes
1 answer
10k views

Defragmentation options on Ext4 filesystem

I have the following devices with Linux Mint 18.1 on laptops and GNU/Linux Debian 9 on the server. (All are 64-bit and with Cinnamon desktop.) All drive devices are formatted with ext4 filesystem; ...
user avatar
2 votes
1 answer
1k views

How to atomically defragment ext4 directories

Fragmentation seems to create a lot of unnecessary seeks when traversing a directory tree on a HDD: # stat -c %F 00 01 02 directory directory directory # filefrag -v 00 01 02 Filesystem type is: ...
user avatar
  • 234
2 votes
0 answers
85 views

External Fragmentation in FreeBSD due to unmovable Kernel pages

Is external fragmentation an issue in FreeBSD due to unmovable Kernel pages similar to what Linux (1) (2) faces?
user avatar
6 votes
2 answers
2k views

How to change the extent size in the ext4 file system?

As you can read here , ext4 file system has an extent feature that groups blocks into extents. Each of them can have up to 128MiB contiguous space. In e4defrag , there are lines similar to the ...
user avatar
2 votes
2 answers
410 views

Will send & receive also defragment data?

I have heavily fragmented (and 90% full) btrfs partition on my laptop. I'd like to perform defragmentation with the help of identical spare hard drive. I already re-created partition table (GPT) and ...
user avatar
3 votes
1 answer
1k views

How to defrag XFS file-system if xfs_fsr exits with "no improvement will be made"?

I am trying to defrag a heavily fragmented XFS file-system on a CentOS 6.6 machine: [root@server opt]# xfs_db -c frag -r /dev/md3 actual 598, ideal 215, fragmentation factor 64.05% However, when I ...
user avatar
  • 1,107
1 vote
2 answers
306 views

Meanings of defragmentation and when it is needed

There seem to be two meanings of defragmentation: Defragmentation is a process that reduces the amount of fragmentation. Fragmentation occurs when the file system cannot or will not allocate enough ...
user avatar
  • 90.6k
6 votes
2 answers
1k views

rsync hangs unless I defrag ext4 filesystem

I have a XBian server (Raspberry Pi version of Debian) running rsync via inetd (not the native dæmon). I am serving a couple of directories on an ext4 filesystem (on a USB disk) as individual modules (...
user avatar
  • 4,151