NTFS performance issue during HD playback

Hi there. I’m having a strange issue, lasting since the March\April build, I don’t remember for sure.

My setup is a RP1 with OSMC, and I use an external disk, 3TB USB with a single NTFS partition, as a library storing solution. During HD playback (720p-1080p) I’m experiencing some lags every 5-10 minutes. The issue seems to be present even if I plug my disk to my Ubuntu 16.04 laptop, so it’s not Kodi’s fault.

I think that the culprit is the default mount options: maybe OSMC and Ubuntu uses the same?
Can anyone point me in some direction? I don’t know where to start to solve this issue!

I think something changed in OSMC because around the same time I’ve seen that the disk goes on standby even if I have transmission sharing active: maybe some caching setting has changed?

You already said yourself that you have similar issues on your Ubuntu laptop. If the same/similar issues persists on two different computers using the same hard drive then maybe it’s not the computer but the hard drive that’s the issue.

Yeah but the drive seems to work properly, otherwise . I’ll try to test it with a Windows machine to rule that out.

Maybe it needs a defrag? It’s 75% full…

Ntfs formatted devices have a huge overhead in linux as the filesystem inplementation is not native. The driver is not as effective as on windows and chews up a lot of cpu.
This is a problem especially on the pi1 where the cpu also has to process the data coming from the usb port.

So better change your hdd filesystem to something else if you need high bitrate movies.

Might be worth running a SMART test on drive.
As drives start to fail you often get pauses when reading as sectors are read multiple times when errors are (intermittently) returned.

I know about FUSE and the NTFS overhead, but I hadn’t issues before, until 2 months ago. I also tried disabling Transmission from the background to free some CPU, but it doesn’t change anything.
Also, this would not explain why I had the same issue on my laptop, which has a i5 quad core.

Good catch! I hope it isn’t this, because the drive is fairly new (2 year maybe) and shouldn’t fail this early. How can I run SMART checks via USB?

A good caddy should pass through SMART data. I believe you can get the Debian package with sudo apt-get install smartmontools (may not be exact package name). Then you can run smartctl /dev/sda etc.

FUSE is not necessary for NTFS on OSMC. You should be able to manually mount the disk and use the kernel support (NTFS is included). This will give you better throughput, but I admit that I have not tested this thoroughly. It is planned in the future to remove the FUSE mounting process for exFAT (exFAT seems buggy in userspace) and for NTFS and use the kernel driver, assuming that it behaves well.

For the long term, I would recommend exFAT, assuming that your goal is for your disk to be interoperable between Ubuntu and Windows. You will then not have to deal with permissions either which can be problematic cross-platform.


Thanks for the tips!

Yeah, interoperability is my main concern. Can I ask you some other questions?

  • Is exFAT supported by smart TV and similar devices?
  • how is exFAT performance-wise under OSMC with a RP1 B+ like mine?
  • what I would need to do to use the kernel-space driver for NTFS?
  • and what about exFAT? Or it works out-of-the-box in kernelspace with OSMC?


Don’t know. Probably higher chance of support than smart TV. What exactly is a ‘similar device’? Android can handle exFAT just fine.

For now, not as good as something like ext.

Use fstab or kernel mount

I covered this in my last post. Eventually we will move from FUSE for NTFS and exFAT to the kernel based fs/ driver as default, but you can use kernel mount manually. For now the performance is OK.