Question about XFS drives fragmentation


Recommended Posts

So I have a "small" array (comparatively to some folks).  11 drives, all 8TB (one drive is a parity).  I made a post previous about how I was defragging them via xfs_fsr command, one drive at a time.

So far I've made it though three drives.  8TB drives with 97% or higher fragmentation on both files and directories takes several days per drive haha.

Anyways, I'm kind of curious how bad fragmentation affects xfs arrays.  Now all my computers, except my unraid server are 100% purely nvme drives.  So fragmentation hasn't been an issues for many years, thanks to SSD's and TRIM.

As I'm defragging, I often see things like:

extents before:4709 after:1 DONE ino=*numbers*

 

most of the time it's before is less than 100.  But I often enough see it say before:26000 after 3 (not done) or the highest so far was before:47569 after:4 (not done).

What are extents... and how bad is it that it took up 47,000 and after it only took up 3 - 4?

Link to comment
  • 1 year later...
On 4/23/2021 at 4:19 PM, Meller said:

So I have a "small" array (comparatively to some folks).  11 drives, all 8TB (one drive is a parity).  I made a post previous about how I was defragging them via xfs_fsr command, one drive at a time.

So far I've made it though three drives.  8TB drives with 97% or higher fragmentation on both files and directories takes several days per drive haha.

Anyways, I'm kind of curious how bad fragmentation affects xfs arrays.  Now all my computers, except my unraid server are 100% purely nvme drives.  So fragmentation hasn't been an issues for many years, thanks to SSD's and TRIM.

As I'm defragging, I often see things like:

extents before:4709 after:1 DONE ino=*numbers*

 

most of the time it's before is less than 100.  But I often enough see it say before:26000 after 3 (not done) or the highest so far was before:47569 after:4 (not done).

What are extents... and how bad is it that it took up 47,000 and after it only took up 3 - 4?

Been a while since you asked, but "before:4709 after:1" means that before defragmenting, the inode spans across 4709 different extents, and afterwards it will occupy just one extent. Think of an extent like a contiguous range of segments on your disk, basically. So with before:4709, your OS would need to read across 4709 different areas to get all parts of that inode.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.