Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[HELP Needed] Plex buffering due to slow read from XFS Array

Featured Replies

Hi there,

I'm writing you because I have an issue with Plex:

Since I swapped my HDD Array because of failure and I switched from BTRFS to XFS on the new HDD, I'm getting buffering issue for the first 10-15 minutes of play of large media files.

I don't remember I ever had this issue with my previous HDD formatted with BTRFS.

I tried both Plex-Media-Server Official and Linuxserver containers: same results.

I also adjusted file paths to bypass Unraid FUSE layer.

This is the long story short.

If you need more details, here's the

Full story

Back in May I had to swap my previous 20TB Toshiba MG10ACA20TE HDD because I started getting hundreds of reallocated sectors warnings: read the thread.

I was using BTRFS as file system on that disk and I don't remember I ever had Plex buffering issue with the same media contents (see more details below).

When I replaced the Toshiba HDD with a Segate IronWolf Pro, I did a "Preclear" with Unraid official plugin before to create a new Array and start content migration.

I also increased NAS RAM from 16GB to 32GB.

I have an UGREEN NASync DXP6800 Pro equipped with:

• 2x 16GB RAM DDR5-4800 Crucial CT16G48C40S5

• 1x 2TB NVME WD Black SN850X

• 1x 22TB Seagate IronWolf Pro ST22000NT001

At first boot I performed a MemTest two times to check for DDR modules stability and everything went fine.

So I booted original OS (UGOS Pro) to check for firmware/BIOS updates and I let it to install them.

As of today, every software is updated to latest stable version.

Then I switched to Unraid OS and I set up my NAS as following:

Cache Pool: 1x 2TB NVME WD Black SN850X

Array Pool: 1x 22TB Seagate IronWolf Pro

(No Parity-Disks since I don't need of that.)

Cache Pool is for Docker Containers and related directories (like AppData).

Array Pool is to store Media Files (Movies and TV Shows).

I have a large collection of 4K HDR Movies (each MKV file is between 50GB and 120GB) and also +80 TV Shows (in a mix of 1080p/4K MKV files).

The buffering issue just happens with large MKV files (starting from ~50GB, mostly movies) but they're all directly played with no transcode on any item (video, audio, subtitles, etc.).

I use a LG TV as Plex Client with webOS Plex App.

I use wired LAN connection on both NAS (10Gbps) and TV (1Gbps). I also tried to switch from LAN to WiFi on my TV since it has WiFi 6 (and I have a WiFi 7 Router) but the buffering issue doesn't seem to be related to network bandwidth.

Is there anyone who can help me to fix this issue?

Really thanks for reading!

  • Community Expert

Any decent HDD should have no issue streaming a single movie. Any filesystem possibly there are other issues. First, make sure nothing else is using the array; check the read/write speed before you start streaming the movie.

You can also start a read check and see if the disk speed is normal; I would expect >250MB/s at the start.

  • Author
23 minutes ago, JorgeB said:

Any decent HDD should have no issue streaming a single movie. Any filesystem possibly there are other issues. First, make sure nothing else is using the array; check the read/write speed before you start streaming the movie.

You can also start a read check and see if the disk speed is normal; I would expect >250MB/s at the start.

Hello @JorgeB

Thank you for your reply.

Here's the Reads value while performing Read-Check:

Screenshot 2025-07-22 alle 18.17.23.png

I also found this suggestion:

Adjust read_ahead_kb (Most Recommended First Step):

  • Identify your device: Use lsblk or df -h to find the device name of your HDD array (e.g., /dev/md0 for a software RAID array, or /dev/sda if it's a single drive or presented as one).

  • Check current value: cat /sys/block/YOUR_DEVICE_NAME/queue/read_ahead_kb (replace YOUR_DEVICE_NAME with what you found, e.g., md0 or sda).

  • Increase it: Try increasing this value temporarily. For large media files on HDDs, values like 8192 (8MB) or even 16384 (16MB) are often good starting points.

Is it worth it?

Thanks!

  • Community Expert

During a stream the disk shoudl be reading at like 5 to 10MB/s, so it's plenty of fast, assuming it's not doing anything else.

1 hour ago, xazac said:

Is it worth it?

Doubt it will help, but it may be worth a try, since it's disk one the device in this case will be /dev/md1p1

  • Author
19 hours ago, JorgeB said:

During a stream the disk shoudl be reading at like 5 to 10MB/s, so it's plenty of fast, assuming it's not doing anything else.

Doubt it will help, but it may be worth a try, since it's disk one the device in this case will be /dev/md1p1

Hello @JorgeB

Thank you for your reply!

Yes, I noticed that during streaming reads value are in that range (5-10/12Mb/s).

Well, I tried the suggestion I posted early and then I started watching a Movie: I never experienced any buffering, even post rewind or fastforward.

Anyway I used /dev/sdb instead of /dev/md1p1.

What's the difference? I assumed that I had to select the whole disk and not a "partition" (what kind of partition is that, anyway? I'm at my first XFS Disk experience).

Really thanks, hope to read from you soon.

  • Community Expert

If it needs the whole disk /dev/sdX will be correct. Note that any writes to the disk would invalidate parity, but I assume it won't do that.

  • 2 weeks later...
  • Author
On 7/23/2025 at 5:08 PM, JorgeB said:

If it needs the whole disk /dev/sdX will be correct. Note that any writes to the disk would invalidate parity, but I assume it won't do that.

Hello @JorgeB

It seems to be working, but everytime I reboot I loose this setting.

How can make it permanent?

Thanks

  • Community Expert

You can create a script with thge user scripts plugin that enables that at array start.

  • Author
On 8/1/2025 at 8:24 AM, JorgeB said:

You can create a script with thge user scripts plugin that enables that at array start.

I never did this before.

Can you @JorgeB please help me?

Thanks

1 hour ago, xazac said:

I never did this before.

install the plugin called user scripts, may read page 1 ogf the plugin thread (documentation)

easy as, add a new script, give it a name, enter the command you are using to change your value, save it, set timer to "1st array start", thats it.

to be honest, i cant imaging that increasing the read ahead ... is the solution for your issue, if it helps now, ok, but very strange then ...

  • Author
13 hours ago, alturismo said:

install the plugin called user scripts, may read page 1 ogf the plugin thread (documentation)

easy as, add a new script, give it a name, enter the command you are using to change your value, save it, set timer to "1st array start", thats it.

to be honest, i cant imaging that increasing the read ahead ... is the solution for your issue, if it helps now, ok, but very strange then ...

Hello @alturismo

Really thanks for your help!

When I was using BTRFS file system I never experienced buffering issue.

Do you suggest me to reformat the drive from XFS to BTRFS?

Thanks

3 hours ago, xazac said:

Do you suggest me to reformat the drive from XFS to BTRFS?

as i personally only use xfs ... nope, my personal experience with btrfs is not really good, do that would be the last choice ...

i always recommend xfs only.

and your setup is fast enough to stream some video files ... i still dont think thats the point, but nevertheless ... if that helps you, put your 2 liner in a user script and you good to go ;)

  • Author
3 hours ago, alturismo said:

as i personally only use xfs ... nope, my personal experience with btrfs is not really good, do that would be the last choice ...

i always recommend xfs only.

and your setup is fast enough to stream some video files ... i still dont think thats the point, but nevertheless ... if that helps you, put your 2 liner in a user script and you good to go ;)

Hello @alturismo and really thanks for your support!

I tried to create a new script as you told me, this is the content:

1 #!/bin/bash
2 bash -c "echo 16384 > /sys/block/sdb/queue/read_ahead_kb"

Is it correct?

I'm a bit confused about the values I get when I use different commands to check the "read_ahead" parameter before to make any change:

  • When I type cat /sys/block/sdb/queue/read_ahead_kb I get 128

  • When I type blockdev --getra /dev/sdb I get 256

Same after I run the script:

  • With cat /sys/block/sdb/queue/read_ahead_kb command I get 16384

  • With blockdev --getra /dev/sdb I get 32768

Maybe because they use different measuring units?


Anyway, I'm getting a HDD replacement with a brand new unit (not refurbished) and I'll start over.

I will do a Preclear before to create a new XFS Volume in order to check disk integrity.

Is there any parameter I need to consider when I will create the XFS Volume on the new HDD?

I am specifically referring to the bytes/sector formatting parameter.

This is the actual configuration of the current disk that I will replace:

Screenshot 2025-08-04 182952.png

These are the official disk specs from Seagate:

Screenshot 2025-08-04 183454.png

Full document here.

Sorry for my noob questions, any help and suggestion are appreciated.

Thanks

2 hours ago, xazac said:

Is there any parameter I need to consider when I will create the XFS Volume on the new HDD?

nope ...

2 hours ago, xazac said:

Maybe because they use different measuring units?

exactly, the blockdev is "old" ... something like 512 Byte blocks, so its basically the same ;)

  • Author
On 8/4/2025 at 9:27 PM, alturismo said:

nope ...

exactly, the blockdev is "old" ... something like 512 Byte blocks, so its basically the same ;)

Hello @alturismo

Thanks for your reply!

I get a brand new replacement disk yesterday and it's running preclear since 21 hours (it's at 85% right now):

Screenshot 2025-08-06 alle 13.13.37.png

I don't remember there were 5 steps, I remember 3 (read, write, read).

So which are these 5 steps?

I also don't remember if the Preclear plugin will format the disk at the end of its job.

Is it better to let Unraid OS to format the disk?

Thanks again

16 minutes ago, xazac said:

I also don't remember if the Preclear plugin will format the disk at the end of its job.

i never preclear a disc ... so definately the wrong person to ask ;)

  • Community Expert
33 minutes ago, xazac said:

I also don't remember if the Preclear plugin will format the disk at the end of its job.

It won't, since the disk would no longer be cleared.

If you are going to add it as a new disk, you will need to format it at array start, if it's going to replace an existing disk, it will be rebuilt using the existing format of that old disk.

  • Author
1 hour ago, JorgeB said:

It won't, since the disk would no longer be cleared.

If you are going to add it as a new disk, you will need to format it at array start, if it's going to replace an existing disk, it will be rebuilt using the existing format of that old disk.

Hello @JorgeB

Thank you for your reply.

Yes, I will add it as a new disk then I'll copy all content from the previous disk.

  • Author

Hello,

Preclear is going to finish in about 13 hours, then I will format the disk with XFS format and I'll start to copy my files from the old disk.

As I don't want to waste disk space, is this setting still worth it?

I would also know if default block size (4KB) is fine for my contents (.mkv files between ~2GB and ~120GB).

Is there any other tip or trick to avoid Plex buffering problem due to initial read speed?

My disk should have a 512MB cache but I can't find any command line to check it.

Last question: is defrag process something I need to consider with such a large files?

Really thanks @JorgeB @alturismo

  • Community Expert
59 minutes ago, xazac said:

is this setting still worth it?

Don't recommend using that, since you'll lose metadata checksums.

1 hour ago, xazac said:

Last question: is defrag process something I need to consider with such a large files?

Don't think it's worth it for mostly WORM data.

  • 4 weeks later...
  • Author

Hello,

I'm here again because I'm still facing the buffering issue.

It's really, really frustrating and I don't know how to fix it.

I tried to:

Swap HDD with a new one;

Change Plex Media Server Container from LinuxServer.io to Official PMS one;

Disable NIC Flow Control through Tips & Tweaks Plugin;

Increase XFS "read_ahead_kb" parameter from 128 (this was the default value assigned by Unraid) to 16384;

Install Unraid 7.2.0 (BETA 2).

None of the above solved this unexpected behaviour.

Is there any log I can collect and post while having the buffering issue in order to get help?

Thanks for your patience.

35 minutes ago, xazac said:

I'm here again because I'm still facing the buffering issue.

like (sadly) expected ... your issue is somewhere else.

rather check the plex logs and consult the plex forums with your logs to check what may be the culprit ...

like mentioned before, the little data usage needed ... even high bitrate 4k media would peak at 10 MB/s read speeds ...(100 mbits) ...

even cheap usb sticks will manage this ;)

as guess, either your network infrastructure or client/s have issues ... but thats just a shot into the blue, so take the logs

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.